diff options
Diffstat (limited to 'tests/tga/heap_overflow.c')
-rw-r--r-- | tests/tga/heap_overflow.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/tga/heap_overflow.c b/tests/tga/heap_overflow.c index ddd4b63..119eb23 100644 --- a/tests/tga/heap_overflow.c +++ b/tests/tga/heap_overflow.c @@ -28,7 +28,9 @@ static void check_file(char *basename) size = read_test_file(&buffer, basename); im = gdImageCreateFromTgaPtr(size, (void *) buffer); - gdTestAssert(im == NULL); + if (!gdTestAssert(im == NULL)) { + gdImageDestroy(im); + } free(buffer); } |