mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 09:58:12 +02:00
Add new check-valgrind target for running the test suite under the influence of valgrind.
Fix memory leak when reference image is not found.
This commit is contained in:
parent
07d09acf2a
commit
2534057cb5
3 changed files with 14 additions and 1 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2005-07-15 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* test/Makefile.am: Add new check-valgrind target for running the
|
||||
test suite under the influence of valgrind.
|
||||
|
||||
* test/buffer-diff.c: (image_diff): Fix memory leak when reference
|
||||
image is not found.
|
||||
|
||||
2005-07-15 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* test/mask.c: (set_gradient_pattern), (set_image_pattern),
|
||||
|
|
|
|||
|
|
@ -179,3 +179,6 @@ CLEANFILES = \
|
|||
ps-surface.ps \
|
||||
pdf-surface.pdf \
|
||||
pdf-clip.pdf
|
||||
|
||||
check-valgrind:
|
||||
TESTS_ENVIRONMENT="libtool --mode=execute valgrind --tool=memcheck --leak-check=yes --show-reachable=yes" $(MAKE) check
|
||||
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue