summaryrefslogtreecommitdiff
path: root/tests/bmp
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2018-06-21 21:22:31 -0400
committerMike Frysinger <vapier@gentoo.org>2018-06-21 21:22:31 -0400
commitc4ee95d1a403061707c17dcae0343ad059e08d2f (patch)
tree017602fc776b12a8e5ad26ef24e9480d0cade61c /tests/bmp
parent98b3f04b21b408573a72548858096770dd12b027 (diff)
downloadlibgd-c4ee95d1a403061707c17dcae0343ad059e08d2f.tar.gz
tests: clean up various buffers/objects
These tests aren't broken because they didn't free the buffers, but by cleaning these up, it's safe to run the testsuite through the leak sanitizer (LSAN) to detect real leaks in the rest of the library. See the previous commit 98b3f04b21b408573a72548858096770dd12b027 as an example of LSAN being useful.
Diffstat (limited to 'tests/bmp')
-rw-r--r--tests/bmp/bug00275.c2
-rw-r--r--tests/bmp/bug00276.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/bmp/bug00275.c b/tests/bmp/bug00275.c
index 9aa85c0..775d849 100644
--- a/tests/bmp/bug00275.c
+++ b/tests/bmp/bug00275.c
@@ -49,5 +49,7 @@ int main()
/* "save" the image as BMP */
gdImageBmpCtx(im, &ctx, 2);
+ gdImageDestroy(im);
+
return gdNumFailures();
}
diff --git a/tests/bmp/bug00276.c b/tests/bmp/bug00276.c
index 58ca423..dd5d513 100644
--- a/tests/bmp/bug00276.c
+++ b/tests/bmp/bug00276.c
@@ -28,5 +28,7 @@ int main()
gdImageDestroy(im_orig);
gdImageDestroy(im_saved);
+ gdFree(data);
+
return gdNumFailures();
}