diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2003-10-01 16:10:53 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2003-10-01 16:10:53 (GMT) |
commit | b6be270f1fc2d8af09b0986e9f792f0af44a4ae6 (patch) | |
tree | e1b892ae629793a60f0dee6d2e2ad43038d0f07b /fortran/src/H5Df.c | |
parent | 94681179ccdd6e9b04be35ecdceb73aa8972d1e8 (diff) | |
download | hdf5-b6be270f1fc2d8af09b0986e9f792f0af44a4ae6.zip hdf5-b6be270f1fc2d8af09b0986e9f792f0af44a4ae6.tar.gz hdf5-b6be270f1fc2d8af09b0986e9f792f0af44a4ae6.tar.bz2 |
[svn-r7529] Purpose: Code cleanup
Description: On Linux systems valdrind tool complained about memroy leaks in the
following statements like
if(!a) free(a);
Solution: replaced the statements with
if ( a != NULL) free(a);
Platforms tested: eirene (too small for committest)
Misc. update:
Diffstat (limited to 'fortran/src/H5Df.c')
-rw-r--r-- | fortran/src/H5Df.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 2c24315..04b38b2 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -283,7 +283,7 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ hid_t c_mem_space_id; hid_t c_file_space_id; hid_t c_xfer_prp; - hobj_ref_t *buf_c; + hobj_ref_t *buf_c = NULL; int i, n; n = (int)*dims; @@ -403,7 +403,7 @@ nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_ hid_t c_mem_space_id; hid_t c_file_space_id; hid_t c_xfer_prp; - hdset_reg_ref_t *buf_c; + hdset_reg_ref_t *buf_c = NULL; int i, n; n = (int)*dims; @@ -464,7 +464,7 @@ nh5dwrite_ref_reg_c_b (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_spac hid_t c_mem_space_id; hid_t c_file_space_id; hid_t c_xfer_prp; - hdset_reg_ref_t *buf_c; + hdset_reg_ref_t *buf_c = NULL; int i, n; n = (int)*dims; @@ -671,7 +671,7 @@ nh5dread_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i hid_t c_mem_space_id; hid_t c_file_space_id; hid_t c_xfer_prp; - hobj_ref_t *buf_c; + hobj_ref_t *buf_c = NULL; int i, n; n = (int)*dims; /* @@ -730,7 +730,7 @@ nh5dread_ref_obj_c_b (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space hid_t c_mem_space_id; hid_t c_file_space_id; hid_t c_xfer_prp; - hobj_ref_t *buf_c; + hobj_ref_t *buf_c = NULL; hsize_t i,n; n = (hsize_t)*dims; /* @@ -789,7 +789,7 @@ nh5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i hid_t c_mem_space_id; hid_t c_file_space_id; hid_t c_xfer_prp; - hdset_reg_ref_t *buf_c; + hdset_reg_ref_t *buf_c = NULL; int i, n; n = (int)*dims; /* @@ -848,7 +848,7 @@ nh5dread_ref_reg_c_b (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space hid_t c_mem_space_id; hid_t c_file_space_id; hid_t c_xfer_prp; - hdset_reg_ref_t *buf_c; + hdset_reg_ref_t *buf_c = NULL; hsize_t i, n; n = (hsize_t)*dims; /* |