summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
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 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;
}