parse: Unref reference to enclosing bins
authorSebastian Rasmussen <sebras@hotmail.com>
Thu, 24 Jul 2014 20:02:58 +0000 (22:02 +0200)
committerThiago Santos <ts.santos@osg.sisa.samsung.com>
Mon, 28 Jul 2014 11:41:27 +0000 (08:41 -0300)
Previously all reference to enclosing bins of an element were leaked
when doing delaying setting a property.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733697

gst/parse/grammar.y

index 3f0513e..53ee15b 100644 (file)
@@ -297,9 +297,12 @@ static void gst_parse_add_delayed_set (GstElement *element, gchar *name, gchar *
         gst_parse_add_delayed_set(parent, sub_name, value_str);
         g_free (sub_name);
       }
+      gst_object_unref (parent);
       parent = child;
       current++;
     }
+    if (parent)
+      gst_object_unref (parent);
     g_strfreev (names);
   }
 }