summaryrefslogtreecommitdiff
path: root/test/buffer-diff.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-07-15 10:39:59 +0000
committerCarl Worth <cworth@cworth.org>2005-07-15 10:39:59 +0000
commit2534057cb5df78eb5aa79c24317e4a97f6c0f2c6 (patch)
tree8fbe289e6023f1117f1a4945df7300b702dd7b28 /test/buffer-diff.c
parent07d09acf2a9a8341f281cfe235325a52a20cd750 (diff)
Add new check-valgrind target for running the test suite under the influence of valgrind.
Fix memory leak when reference image is not found.
Diffstat (limited to 'test/buffer-diff.c')
-rw-r--r--test/buffer-diff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/buffer-diff.c b/test/buffer-diff.c
index e540d2f9b..e5ba513ac 100644
--- a/test/buffer-diff.c
+++ b/test/buffer-diff.c
@@ -112,8 +112,10 @@ image_diff (const char *filename_a,
return -1;
status = read_png_argb32 (filename_b, &buf_b, &width_b, &height_b, &stride_b);
- if (status)
+ if (status) {
+ free (buf_a);
return -1;
+ }
if (width_a != width_b ||
height_a != height_b ||