gdkpixbufdec: Fix pixbuf_loader leak during failures
authorVineeth TM <vineeth.tm@samsung.com>
Thu, 8 Oct 2015 02:44:04 +0000 (11:44 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 8 Oct 2015 14:01:53 +0000 (15:01 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=756219

ext/gdk_pixbuf/gstgdkpixbufdec.c

index 02e780c..36cfbc0 100644 (file)
@@ -547,6 +547,11 @@ gst_gdk_pixbuf_dec_change_state (GstElement * element,
       }
       g_list_free_full (dec->pending_events, (GDestroyNotify) gst_event_unref);
       dec->pending_events = NULL;
+      if (dec->pixbuf_loader != NULL) {
+        gdk_pixbuf_loader_close (dec->pixbuf_loader, NULL);
+        g_object_unref (G_OBJECT (dec->pixbuf_loader));
+        dec->pixbuf_loader = NULL;
+      }
       break;
     default:
       break;