From e94e6e6f7c400ced5ebf71e57b4f70af560b1185 Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 8 Jul 2003 09:54:47 +0000 Subject: Free the string returned by CCTK_GroupName(); This closes PR Cactus/1560. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3267 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 f1175ae8..47ff530b 100644 --- a/src/comm/CactusDefaultComm.c +++ b/src/comm/CactusDefaultComm.c @@ -627,6 +627,7 @@ int CactusDefaultGroupStorageIncrease (cGH *GH, int n_groups, const int *groups, const int *timelevels, int *status) { int i, value, retval; + char *gname; /* Avoid a warning about timelevels being unused. */ @@ -639,7 +640,9 @@ int CactusDefaultGroupStorageIncrease (cGH *GH, int n_groups, const int *groups, { if(groups[i] >= 0) { - value = CCTK_EnableGroupStorage(GH, CCTK_GroupName(groups[i])); + gname = CCTK_GroupName(groups[i]); + value = CCTK_EnableGroupStorage(GH, gname); + free (gname); retval += value; if(status) { -- cgit v1.2.3