[Pixman] [PATCH 4/8] Fix leak.
bansan85
legarrec.vincent at gmail.com
Wed Dec 13 19:41:35 UTC 2017
---
test/stress-test.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/test/stress-test.c b/test/stress-test.c
index bdd70a8..273a2a2 100644
--- a/test/stress-test.c
+++ b/test/stress-test.c
@@ -386,13 +386,18 @@ create_random_bits_image (alpha_preference_t alpha_preference)
/* Finally create the image */
image = pixman_image_create_bits (format, width, height, bits, stride);
if (!image)
+ {
+ free (coefficients);
return NULL;
+ }
pixman_image_set_indexed (image, indexed);
pixman_image_set_destroy_function (image, destroy, indexed);
pixman_image_set_accessors (image, read_func, write_func);
pixman_image_set_filter (image, filter, coefficients, n_coefficients);
+ free (coefficients);
+
return image;
}
--
2.15.0
More information about the Pixman
mailing list