summaryrefslogtreecommitdiffstats
path: root/test/dectris_tst.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2012-08-09 19:59:43 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2012-08-09 19:59:43 (GMT)
commit3b3ae10c5b7a54a64c92b321d53cfe3b00c6584d (patch)
tree00ef6ec200109ee176834d33ffdc16f2b8f39cf2 /test/dectris_tst.c
parentfaba610060cb168d97a7b9c01d95688542e2cf28 (diff)
downloadhdf5-3b3ae10c5b7a54a64c92b321d53cfe3b00c6584d.zip
hdf5-3b3ae10c5b7a54a64c92b321d53cfe3b00c6584d.tar.gz
hdf5-3b3ae10c5b7a54a64c92b321d53cfe3b00c6584d.tar.bz2
[svn-r22653] Dectris project: I revised the code per Quincey's suggestion.
Tested on koala.
Diffstat (limited to 'test/dectris_tst.c')
-rw-r--r--test/dectris_tst.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/dectris_tst.c b/test/dectris_tst.c
index a6bbaab..56d58ab 100644
--- a/test/dectris_tst.c
+++ b/test/dectris_tst.c
@@ -167,7 +167,8 @@ main (void)
offset[1] = 0;
}
- free(outbuf);
+ if(outbuf)
+ free(outbuf);
if(H5Dclose(dataset) < 0)
TEST_ERROR;
@@ -244,7 +245,8 @@ main (void)
offset[1] = 0;
}
- free(outbuf);
+ if(outbuf)
+ free(outbuf);
if(H5Dclose(dataset) < 0)
TEST_ERROR;
@@ -300,5 +302,9 @@ error:
H5Pclose(dxpl);
H5Fclose(file);
} H5E_END_TRY;
+
+ if(outbuf)
+ free(outbuf);
+
return 1;
}