diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-10-12 16:28:18 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-10-12 16:28:18 (GMT) |
commit | 8c789704da055918bf1294c5d80f5a4add8572bc (patch) | |
tree | c46d6c9d7531aafba22b9806f6974d710fe77b4a /fortran/src/H5Of.c | |
parent | fc84edb7e3514556e1b5cbd5268d35fcf21054b6 (diff) | |
download | hdf5-8c789704da055918bf1294c5d80f5a4add8572bc.zip hdf5-8c789704da055918bf1294c5d80f5a4add8572bc.tar.gz hdf5-8c789704da055918bf1294c5d80f5a4add8572bc.tar.bz2 |
[svn-r28039] Fixed valgrind mem leak.
Tested: h5committest (partial).
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: |