From f3c8ddc125632f3b1a004056107fa4e0b2a92b56 Mon Sep 17 00:00:00 2001 From: schnetter Date: Fri, 16 Jan 2004 12:39:44 +0000 Subject: Fix memory leak in CactusDefaultGroupStorageDecrease git-svn-id: http://svn.cactuscode.org/flesh/trunk@3511 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/comm/CactusDefaultComm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/comm') diff --git a/src/comm/CactusDefaultComm.c b/src/comm/CactusDefaultComm.c index 75d133c3..6b16fa90 100644 --- a/src/comm/CactusDefaultComm.c +++ b/src/comm/CactusDefaultComm.c @@ -746,6 +746,7 @@ int CactusDefaultGroupStorageDecrease (const cGH *GH, int n_groups, int *status) { int i, value, retval; + char *gname; /* Has the normal group storage been overloaded ? */ @@ -762,7 +763,9 @@ int CactusDefaultGroupStorageDecrease (const cGH *GH, int n_groups, value = 0; if(timelevels[i] == 0) { - value = CCTK_DisableGroupStorage(GH, CCTK_GroupName(groups[i])); + gname = CCTK_GroupName(groups[i]); + value = CCTK_DisableGroupStorage(GH, gname); + free (gname); if (value) { value = CCTK_NumTimeLevelsI(groups[i]); -- cgit v1.2.3