summaryrefslogtreecommitdiffstats
path: root/src/H5Lexternal.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-02-08 21:35:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-02-08 21:35:54 (GMT)
commit575469a6a7aef24eb79b7822c25f91043a4d4c2a (patch)
tree4d7980af0304bad8b86ee76ae6460120b20d65e4 /src/H5Lexternal.c
parenta6d5fa2c7db165fa2cecee86bdbd201339349968 (diff)
downloadhdf5-575469a6a7aef24eb79b7822c25f91043a4d4c2a.zip
hdf5-575469a6a7aef24eb79b7822c25f91043a4d4c2a.tar.gz
hdf5-575469a6a7aef24eb79b7822c25f91043a4d4c2a.tar.bz2
[svn-r20065] Description:
Bring changes from Coverity branch to trunk: r19975: Fixed potential mem leak at H5O_attr_open_by_name r19980: Fix coverity issue 792. Free tmp_env_prefix in H5Lexternal.c line 365 if it is not NULL but its contents are 0 when it goes out of scope. r20039: Eliminate warnings about nested extern and implicit declarations of parallel_print and address Coverity defects 712-781 by #including h5tools_utils.h in h5diff_array.c, h5diff_attr.c, h5diff_dset.c and h5diff_util.c. r20046: Purpose: Address TOCTOU warnings in h5jam and h5unjam Description: Coverity is afraid that the state of the input file could change between the call to stat() and the call to open(). This is called a time-of- check time-of-use (TOCTOU) vulnerability. Modified stat calls to fstat which uses an open file pointer so it (hopefully) won't complain any more. r20047: Addressed coverity issues 135-137, 462-464. Local pointers that needed to be freed in case of error were moved out of a switch statement in src/H5Tnative.c, set to NULL, and checked before freeing. Tested on: Mac OS X/32 10.6.6 (amazon) w/debug & production (h5committested on Coverity branch)
Diffstat (limited to 'src/H5Lexternal.c')
-rw-r--r--src/H5Lexternal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index eb2ffe5..bbc9442 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -359,7 +359,7 @@ H5L_extern_traverse(const char UNUSED *link_name, hid_t cur_group,
if(H5L_build_name(out_prefix_name, temp_file_name, &full_name/*out*/) < 0) {
saved_env = (char *)H5MM_xfree(saved_env);
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
- }
+ } /* end if */
ext_file = H5F_open(full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id);
full_name = (char *)H5MM_xfree(full_name);