From 226deb9b38091e963f68ece343351cae0da8348c Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 6 May 2010 15:39:31 +0300 Subject: [PATCH] gdkpixbuf: don't leak template caps --- ext/gdk_pixbuf/gstgdkpixbuf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c index d194558615..1896eb4415 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; }