]> Pileus Git - ~andy/gtk/commitdiff
cssimage: Fix huge memleak
authorBenjamin Otte <otte@redhat.com>
Tue, 6 Nov 2012 16:50:14 +0000 (17:50 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 6 Nov 2012 17:04:10 +0000 (18:04 +0100)
When transitioning gradients, we were leaking the gradient structs. Not
good.

https://bugzilla.gnome.org/show_bug.cgi?id=687467

gtk/gtkcssimagegradient.c

index 40ee17f508b32474f215c6b1977cd4bb1c3bb0ef..8497339a3e343b2bcf04361df213700eac504dfd 100644 (file)
@@ -79,7 +79,7 @@ fade_pattern (cairo_pattern_t *pattern,
       cairo_pattern_add_color_stop_rgba (result, o, r, g, b, a * opacity);
     }
 
-  return pattern;
+  return result;
 }
 
 static cairo_pattern_t *