summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2010-01-08 19:24:47 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2010-01-08 19:24:47 (GMT)
commit0ec9ee15c8f3cb3f495e767ccbd9ce52ac1c4d26 (patch)
treeb506212c2a5e58ee388252893c12770f8e777914 /tools
parent23bfde73c21eab60d9c1143230b2c67dc07b4311 (diff)
downloadhdf5-0ec9ee15c8f3cb3f495e767ccbd9ce52ac1c4d26.zip
hdf5-0ec9ee15c8f3cb3f495e767ccbd9ce52ac1c4d26.tar.gz
hdf5-0ec9ee15c8f3cb3f495e767ccbd9ce52ac1c4d26.tar.bz2
[svn-r18084] Fix coverity item 269 + others. When a error occurred in a function using the
h5tools error framework, the "past_catch" variable would not be set to true because that statement was before the label that goto jumped to. This could cause a failure in the cleanup section to go back to the start of the section, freeing variables twice, etc. Moved the label infront of past_catch=TRUE. Tested: Fedora
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5tools_error.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h
index da8f03c..dc5f87b 100644
--- a/tools/lib/h5tools_error.h
+++ b/tools/lib/h5tools_error.h
@@ -71,7 +71,7 @@ extern hid_t H5E_tools_min_id_g;
/* Macro for "catching" flow of control when an error occurs. Note that the
* H5_LEAVE macro won't jump back here once it's past this point.
*/
-#define CATCH past_catch = TRUE; catch_except:;
+#define CATCH catch_except:; past_catch = TRUE;
/*
* H5_LEAVE macro, used to facilitate control flow between a