summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Of.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-11-05 19:03:06 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-11-05 19:03:06 (GMT)
commit26b328aec8e10b9101c76bc049b6b5045b5f00a5 (patch)
tree3d5cb4707febc7d52fe0d325fa06b143bfc68820 /fortran/src/H5Of.c
parenteb13dc7ec9281a9206f6e0a2a54151adf2ddecd3 (diff)
parent401f0c181ea8e9f486203a6b70710f0631a4a640 (diff)
downloadhdf5-26b328aec8e10b9101c76bc049b6b5045b5f00a5.zip
hdf5-26b328aec8e10b9101c76bc049b6b5045b5f00a5.tar.gz
hdf5-26b328aec8e10b9101c76bc049b6b5045b5f00a5.tar.bz2
[svn-r28288] merge from trunk.
Diffstat (limited to 'fortran/src/H5Of.c')
-rw-r--r--fortran/src/H5Of.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index 4801f7d..9e3ddc4 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -901,13 +901,19 @@ h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
if((c_bufsize = H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,(hid_t)*lapl_id )) < 0)
HGOTO_DONE(FAIL);
+ if(c_name)
+ HDfree(c_name);
+
*bufsize = (size_t_f)c_bufsize;
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- if(c_comment)
+ if(c_comment) {
HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
+ HDfree(c_comment);
+ }
+
return ret_value;
done: