[Pixman] [PATCH] fast_bilinear_cover_init: Don't install a finalizer on the error path

Søren Sandmann sandmann at cs.au.dk
Tue Aug 27 22:58:21 PDT 2013


From: Søren Sandmann Pedersen <ssp at redhat.com>

No memory is allocated in the error case, so a finalizer is not
necessary, and will cause problems if the data pointer is not
initialized to NULL.
---
 pixman/pixman-fast-path.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index 2608268..5d52b4a 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -2489,7 +2489,7 @@ fail:
 	FUNC, "Allocation failure or bad matrix, skipping rendering\n");
     
     iter->get_scanline = _pixman_iter_get_scanline_noop;
-    iter->fini = bilinear_cover_iter_fini;
+    iter->fini = NULL;
 }
 
 #define IMAGE_FLAGS							\
-- 
1.7.11.7



More information about the Pixman mailing list