From db06681b487873788b51a6766894fc619eb8d8f2 Mon Sep 17 00:00:00 2001 From: Alfred Peng Date: Tue, 8 Aug 2006 10:57:33 -0700 Subject: [PATCH] Fix leaks in failure paths in pixman gradient creation --- pixman/src/icimage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c index 9cf054918..ea04636f0 100644 --- a/pixman/src/icimage.c +++ b/pixman/src/icimage.c @@ -233,6 +233,7 @@ pixman_image_create_linear_gradient (const pixman_linear_gradient_t *gradient, if (_pixman_init_gradient (&image->pSourcePict->gradient, stops, n_stops)) { + free (linear); free (image); return 0; } @@ -288,6 +289,7 @@ pixman_image_create_radial_gradient (const pixman_radial_gradient_t *gradient, if (_pixman_init_gradient (&image->pSourcePict->gradient, stops, n_stops)) { + free (radial); free (image); return 0; }