summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-08-09 01:02:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-08-09 01:02:02 (GMT)
commit4e6b652c3d0fdd94fc7f2aa588ab63cea7bcde64 (patch)
tree067a2194a69b6f5334310528b1650c131971c861 /hl/test
parent98ac51ba1c4b73081ab0a3091f3cca703426b593 (diff)
downloadhdf5-4e6b652c3d0fdd94fc7f2aa588ab63cea7bcde64.zip
hdf5-4e6b652c3d0fdd94fc7f2aa588ab63cea7bcde64.tar.gz
hdf5-4e6b652c3d0fdd94fc7f2aa588ab63cea7bcde64.tar.bz2
[svn-r22647] Description:
Bring r22646 from trunk to 1.8 branch: 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/test')
-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 2e1e465..bd4a947 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -514,6 +514,7 @@ static int test_generate(void)
char *srcdir = getenv("srcdir"); /* the source directory */
char data_file[512]=""; /* buffer to hold name of existing data file */
int i;
+ int retval = FAIL;
/* create a file using default properties */
if ((fid=H5Fcreate(FILE3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
@@ -686,15 +687,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;
}