ext/gdk_pixbuf/gstgdkpixbuf.c: more memleak fixage
authorBenjamin Otte <otte@gnome.org>
Tue, 3 Feb 2004 22:51:34 +0000 (22:51 +0000)
committerBenjamin Otte <otte@gnome.org>
Tue, 3 Feb 2004 22:51:34 +0000 (22:51 +0000)
Original commit message from CVS:
2004-02-03  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_type_find):
more memleak fixage

ChangeLog
ext/gdk_pixbuf/gstgdkpixbuf.c

index 73a5eae..e8c5eb9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-02-03  Benjamin Otte  <in7y118@public.uni-hamburg.de>
 
+       * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_type_find):
+         more memleak fixage
+
+2004-02-03  Benjamin Otte  <in7y118@public.uni-hamburg.de>
+
        * ext/gdk_pixbuf/gstgdkpixbuf.c: (plugin_init):
        * gst/typefind/gsttypefindfunctions.c:
          fix memleaks shown by gst-typefind
index ca1e36b..864b54f 100644 (file)
@@ -413,10 +413,13 @@ gst_gdk_pixbuf_type_find (GstTypeFind *tf, gpointer ignore)
   format = gdk_pixbuf_loader_get_format (pixbuf_loader);
 
   if (format != NULL) {
+    GstCaps *caps;
     gchar **mlist = gdk_pixbuf_format_get_mime_types(format);
 
-    gst_type_find_suggest (tf, GST_TYPE_FIND_MINIMUM,
-        gst_caps_new_simple (mlist[0], NULL));
+    caps = gst_caps_new_simple (mlist[0], NULL);
+    gst_type_find_suggest (tf, GST_TYPE_FIND_MINIMUM, caps);
+    gst_caps_free (caps);
+    g_strfreev (mlist);
   }
 
   gdk_pixbuf_loader_close (pixbuf_loader, NULL);