[svn-r5038]

Purpose:
    Bug fix
Description:
    Several C stub functions were not releasing allocated strings.
Solution:
    Fixed
Platforms tested:
    Solaris 2.7
This commit is contained in:
Elena Pourmal 2002-03-06 17:47:01 -05:00
parent aa5d82f9b0
commit 4dcb0766fc
2 changed files with 8 additions and 2 deletions

View File

@ -49,14 +49,17 @@ nh5eprint_c1(_fcd name, int_f* namelen)
int c_namelen;
c_namelen = *namelen;
c_name = (char*)HD5f2cstring(name, c_namelen);
if(c_name == NULL) return ret_val;
file = fopen(c_name, "a");
if(!file) return ret_val;
if(!file) { HDfree(c_name);
return ret_val;
}
/*
* Call H5Eprint function.
*/
status = H5Eprint(file);
fclose(file);
HDfree(c_name);
if(status < 0) return ret_val;
ret_val = 0;
return ret_val;

View File

@ -1183,6 +1183,8 @@ nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* m
c_meta_plist = *meta_plist;
c_raw_plist = *raw_plist;
ret = H5Pset_fapl_split(c_prp_id, c_meta_ext, c_meta_plist, c_raw_ext, c_raw_plist );
HDfree(c_meta_ext);
HDfree(c_raw_ext);
if (ret < 0) return ret_value;
ret_value = 0;
return ret_value;
@ -1540,6 +1542,7 @@ nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, int_f* offset, h
*/
c_prp_id = *prp_id;
ret = H5Pset_external(c_prp_id, c_name, c_offset, c_bytes);
HDfree(c_name);
if (ret < 0) return ret_value;
ret_value = 0;