summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-08-08 23:01:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-08-08 23:01:20 (GMT)
commit88a94bbe7ffa3c0bb7779d1b16989b385d9eadd2 (patch)
treebe52b18015cf8df4af976ab5cfdc912748783b22 /hl
parent79b2eb993e29cf0382db07b322fa3ca5cb00fc65 (diff)
downloadhdf5-88a94bbe7ffa3c0bb7779d1b16989b385d9eadd2.zip
hdf5-88a94bbe7ffa3c0bb7779d1b16989b385d9eadd2.tar.gz
hdf5-88a94bbe7ffa3c0bb7779d1b16989b385d9eadd2.tar.bz2
[svn-r22646] Description:
Changes resulting from Klocwork static analysis tool, from Mark Miller @ LLNL (miller86@llnl.gov). Tested on: Mac OS X/64 10.7.4 (amazon) w/debug, C++ & FORTRAN, using gcc 4.7.x (too minor to require h5committest)
Diffstat (limited to 'hl')
-rw-r--r--hl/test/test_image.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index 3914a9f..4cef1b4 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -513,6 +513,7 @@ static int test_generate(void)
FILE *f;
const char *data_file = H5_get_srcdir_filename(DATA_FILE4);
int i;
+ int retval = FAIL;
/* create a file using default properties */
if ((fid=H5Fcreate(FILE3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
@@ -674,15 +675,17 @@ static int test_generate(void)
if (H5Fclose(fid)<0)
goto out;
- return 0;
+ /* Indicate success */
+ retval = 0;
/* error zone, gracefully close */
out:
+ HDfree(data);
H5E_BEGIN_TRY {
H5Fclose(fid);
} H5E_END_TRY;
H5_FAILED();
- return FAIL;
+ return retval;
}