diff options
Diffstat (limited to 'test/dectris_tst.c')
-rw-r--r-- | test/dectris_tst.c | 10 |
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; } |