librsvg r1198 - trunk



Author: doml
Date: Thu Feb 19 23:19:18 2009
New Revision: 1198
URL: http://svn.gnome.org/viewvc/librsvg?rev=1198&view=rev

Log:
2009-02-19  Hagen Schink <troja84 gmail com>

        * rsvg-base.c: Memory leak in rsvg_handle_get_dimensions_sub(). Bug #562546



Modified:
   trunk/ChangeLog
   trunk/rsvg-base.c

Modified: trunk/rsvg-base.c
==============================================================================
--- trunk/rsvg-base.c	(original)
+++ trunk/rsvg-base.c	Thu Feb 19 23:19:18 2009
@@ -1314,8 +1314,12 @@
 
 	draw = rsvg_cairo_new_drawing_ctx (cr, handle);
     
-	if (!draw)
+	if (!draw) {
+	    cairo_destroy (cr);
+	    cairo_surface_destroy (target);
+	    
 	    return FALSE;
+	}
 
 	while (sself != NULL) {
 	    draw->drawsub_stack = g_slist_prepend (draw->drawsub_stack, sself);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]