summaryrefslogtreecommitdiffstats
path: root/hl/tools/gif2h5/h52gifgentst.c
diff options
context:
space:
mode:
Diffstat (limited to 'hl/tools/gif2h5/h52gifgentst.c')
-rw-r--r--hl/tools/gif2h5/h52gifgentst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hl/tools/gif2h5/h52gifgentst.c b/hl/tools/gif2h5/h52gifgentst.c
index 6a41028..39e950b 100644
--- a/hl/tools/gif2h5/h52gifgentst.c
+++ b/hl/tools/gif2h5/h52gifgentst.c
@@ -57,8 +57,8 @@ int main(void)
hsize_t height = HEIGHT;
/* Allocate buffer */
- buf = (unsigned char *)malloc(WIDTH * HEIGHT);
- assert(buf);
+ if(NULL == (buf = (unsigned char *)malloc(WIDTH * HEIGHT)))
+ return EXIT_FAILURE;
/* create a file */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)