basetransform: fix pool leak when early returning in decide_allocation
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 21 Jul 2016 08:52:30 +0000 (10:52 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 11 Nov 2016 13:29:35 +0000 (13:29 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=769023

libs/gst/base/gstbasetransform.c

index de04a48..5b08cec 100644 (file)
@@ -960,6 +960,9 @@ gst_base_transform_default_decide_allocation (GstBaseTransform * trans,
   return TRUE;
 
 config_failed:
+  if (pool)
+    gst_object_unref (pool);
+
   GST_ELEMENT_ERROR (trans, RESOURCE, SETTINGS,
       ("Failed to configure the buffer pool"),
       ("Configuration is most likely invalid, please report this issue."));