diff options
author | tradke <tradke@eff87b29-5268-4891-90a3-a07138403961> | 2002-01-18 15:09:53 +0000 |
---|---|---|
committer | tradke <tradke@eff87b29-5268-4891-90a3-a07138403961> | 2002-01-18 15:09:53 +0000 |
commit | f5116cc5d1cc0a1fbf0575022fa8f3deacd06a84 (patch) | |
tree | 310736e6a205558a660436e3c0c62b4b40fc5e0d | |
parent | 42b53f3d80be77d3ff67bdabfce7f8feec375bd0 (diff) |
Fixed a small memory leak.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusIO/IOJpeg/trunk@52 eff87b29-5268-4891-90a3-a07138403961
-rw-r--r-- | src/Output2D.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/Output2D.c b/src/Output2D.c index 58fb05b..9c8a8e4 100644 --- a/src/Output2D.c +++ b/src/Output2D.c @@ -186,11 +186,11 @@ int IOJpeg_TriggerOutput2D (const cGH *GH, int vindex) /**************************** local functions ******************************/ static void CheckSteerableParameters (IOJpegGH *myGH) { - DECLARE_CCTK_PARAMETERS - int out2D_vars_current_nset; - int out_old; - int i; + int i, out_old, out2D_vars_current_nset; + char *msg, *fullname; static int out2D_vars_lastset = 0; + DECLARE_CCTK_PARAMETERS + out_old = myGH->out2D_every; @@ -228,13 +228,28 @@ static void CheckSteerableParameters (IOJpegGH *myGH) if (CCTK_Equals (newverbose, "standard") || CCTK_Equals (newverbose, "full")) { - for (i=0;i<CCTK_NumVars();i++) + msg = NULL; + for (i = CCTK_NumVars () - 1; i >= 0; i--) { if (myGH->do_out2D[i]) { - CCTK_VInfo (CCTK_THORNSTRING, "IOJpeg_2D: Output for %s",CCTK_FullName(i)); + fullname = CCTK_FullName (i); + if (! msg) + { + Util_asprintf (&msg, "IOJpeg_2D: Output requested for %s",fullname); + } + else + { + Util_asprintf (&msg, "%s %s", msg, fullname); + } + free (fullname); } } + if (msg) + { + CCTK_INFO (msg); + free (msg); + } } /* Save the last setting of 'out2D_vars' parameter */ |