summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Ef.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2002-03-06 22:47:01 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2002-03-06 22:47:01 (GMT)
commit4dcb0766fc329a6f61cc3b45128c0c3bfe7a4e9f (patch)
tree04c2e71d9deda652d1bcba77f7e2e08d70de1379 /fortran/src/H5Ef.c
parentaa5d82f9b0340aa5de9cf2c93ef3a1cd99867f56 (diff)
downloadhdf5-4dcb0766fc329a6f61cc3b45128c0c3bfe7a4e9f.zip
hdf5-4dcb0766fc329a6f61cc3b45128c0c3bfe7a4e9f.tar.gz
hdf5-4dcb0766fc329a6f61cc3b45128c0c3bfe7a4e9f.tar.bz2
[svn-r5038]
Purpose: Bug fix Description: Several C stub functions were not releasing allocated strings. Solution: Fixed Platforms tested: Solaris 2.7
Diffstat (limited to 'fortran/src/H5Ef.c')
-rw-r--r--fortran/src/H5Ef.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c
index de991e3..7b5aea4 100644
--- a/fortran/src/H5Ef.c
+++ b/fortran/src/H5Ef.c
@@ -49,14 +49,17 @@ nh5eprint_c1(_fcd name, int_f* namelen)
int c_namelen;
c_namelen = *namelen;
c_name = (char*)HD5f2cstring(name, c_namelen);
+ if(c_name == NULL) return ret_val;
file = fopen(c_name, "a");
- if(!file) return ret_val;
+ if(!file) { HDfree(c_name);
+ return ret_val;
+ }
/*
* Call H5Eprint function.
*/
status = H5Eprint(file);
fclose(file);
-
+ HDfree(c_name);
if(status < 0) return ret_val;
ret_val = 0;
return ret_val;