aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DumpVar.c6
-rw-r--r--src/Write2D.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/src/DumpVar.c b/src/DumpVar.c
index 96613da..8ebee86 100644
--- a/src/DumpVar.c
+++ b/src/DumpVar.c
@@ -104,6 +104,11 @@ int IOJpeg_DumpVar (cGH *GH, int index, int timelevel, IOJpegGeo_t *geo, FILE *f
if (data)
free (data);
+ if (hsize)
+ {
+ free (hsize);
+ }
+
return (0);
}
@@ -150,6 +155,7 @@ int IOJpeg_Output(cGH *GH, int index, int timelevel, CCTK_REAL *data,
colormap_quality,
fid);
+ free(dataout);
return(1);
}
diff --git a/src/Write2D.c b/src/Write2D.c
index 0eb0970..6260c89 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -62,11 +62,13 @@ int IOJpeg_Write2D (cGH *GH, int index, const char *alias)
/* see if output file for this alias name was already created */
fdset_2D = (FILE **) GetNamedData (ssGH->fileList_2D, alias);
- /* if (fdset_2D == NULL) */
{
char *fname;
-
- fdset_2D = (FILE **) malloc (max_slabs * sizeof (FILE *));
+
+ if (!fdset_2D)
+ {
+ fdset_2D = (FILE **) malloc (max_slabs * sizeof (FILE *));
+ }
fname = (char *) malloc ((strlen (ssGH->outdir2D) +
strlen (alias) + 20)*sizeof(char));