summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Lf.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-02-22 19:37:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-02-22 19:37:06 (GMT)
commit727b687ae6c80c9854cb53814fa1c12f27c2994c (patch)
treefabe359aaddbe3b4d1e2bb58ceb3b94311d66a1c /fortran/src/H5Lf.c
parent25486d50895fa4a30809d289b9aff4de583a9b84 (diff)
downloadhdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.zip
hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.tar.gz
hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.tar.bz2
[svn-r20146] Description:
Bring r19714:20145 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.6 (amazon) in debug mode Mac OS X/32 10.6.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'fortran/src/H5Lf.c')
-rw-r--r--fortran/src/H5Lf.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index 59f4535..c971d5e 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -394,7 +394,7 @@ done:
* Modifications: N/A
*---------------------------------------------------------------------------*/
int_f
-nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
+nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type,
haddr_t_f *address, size_t_f *val_size,
hid_t_f *lapl_id)
@@ -406,16 +406,16 @@ nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
/*
* Convert FORTRAN name to C name
*/
- if((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ if(NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
+ HGOTO_DONE(FAIL);
+
/*
* Call H5Linfo function.
*/
if(H5Lget_info((hid_t)*link_loc_id, c_link_name, &link_buff, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ HGOTO_DONE(FAIL);
/* Unpack the structure */
-
*cset = (int_f)link_buff.cset;
*corder = (int_f)link_buff.corder;
*corder_valid = 0;
@@ -425,6 +425,9 @@ nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
*val_size = (size_t_f)link_buff.u.val_size;
done:
+ if(c_link_name)
+ HDfree(c_link_name);
+
return ret_value;
}