diff options
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/H5Of.c | 8 | ||||
-rw-r--r-- | fortran/src/H5Pf.c | 8 | ||||
-rw-r--r-- | fortran/src/H5Tf.c | 3 |
3 files changed, 18 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: diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 9735f48..523ed0b 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -4843,6 +4843,10 @@ h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens * * SOURCE */ +#ifndef H5_HAVE_DIRECT +/* Only gets gcc const attribute when the direct VFD is not built. */ +H5_ATTR_CONST +#endif int_f h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) /******/ @@ -4886,6 +4890,10 @@ h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a * * SOURCE */ +#ifndef H5_HAVE_DIRECT +/* Only gets gcc const attribute when the direct VFD is not built. */ +H5_ATTR_CONST +#endif int_f h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size) /******/ diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index b6389258..9928d0a 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -2421,7 +2421,10 @@ h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value) if (c_name == NULL) return ret_value; status = H5Tenum_insert( (hid_t)*type_id, c_name, value); + + HDfree(c_name); if ( status < 0 ) return ret_value; + ret_value = 0; return ret_value; } |