diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-12-14 15:22:29 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-12-14 15:22:29 (GMT) |
commit | 7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a (patch) | |
tree | 6bd24199653eff3e99f312d748ba4909686bef61 /fortran/src/H5Of.c | |
parent | 8e9b142d9cd347432d400b4f9b3b88a3f047c06d (diff) | |
parent | 2cb441c507dfbd4437ccf29e232a9b730e6e1003 (diff) | |
download | hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.zip hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.gz hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.bz2 |
[svn-r28636] merge from trunk.
Diffstat (limited to 'fortran/src/H5Of.c')
-rw-r--r-- | fortran/src/H5Of.c | 8 |
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: |