From: Stefan Kost Date: Thu, 6 May 2010 12:39:31 +0000 (+0300) Subject: gdkpixbuf: don't leak template caps X-Git-Tag: RELEASE-0.10.23~124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=226deb9b38091e963f68ece343351cae0da8348c;p=platform%2Fupstream%2Fgst-plugins-good.git gdkpixbuf: don't leak template caps --- diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c index d194558..1896eb4 100644 --- a/ext/gdk_pixbuf/gstgdkpixbuf.c +++ b/ext/gdk_pixbuf/gstgdkpixbuf.c @@ -118,6 +118,7 @@ gst_gdk_pixbuf_get_capslist (void) GSList *slist0; GstCaps *capslist = NULL; GstCaps *return_caps = NULL; + GstCaps *tmpl_caps; capslist = gst_caps_new_empty (); slist0 = gdk_pixbuf_get_formats (); @@ -137,9 +138,10 @@ gst_gdk_pixbuf_get_capslist (void) } g_slist_free (slist0); - return_caps = gst_caps_intersect (capslist, - gst_static_caps_get (&gst_gdk_pixbuf_sink_template.static_caps)); + tmpl_caps = gst_static_caps_get (&gst_gdk_pixbuf_sink_template.static_caps); + return_caps = gst_caps_intersect (capslist, tmpl_caps); + gst_caps_unref (tmpl_caps); gst_caps_unref (capslist); return return_caps; }