nleobject: don't leak srcpad when disposing
authorJustin Kim <justin.kim@collabora.com>
Fri, 11 Sep 2015 07:13:19 +0000 (16:13 +0900)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 11 Sep 2015 11:09:40 +0000 (13:09 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=754867

plugins/nle/nleobject.c

index 94be16d..bccf8d2 100644 (file)
@@ -299,6 +299,11 @@ nle_object_dispose (GObject * object)
     nle->caps = NULL;
   }
 
+  if (nle->srcpad) {
+    nle_object_remove_ghost_pad (nle, nle->srcpad);
+    nle->srcpad = NULL;
+  }
+
   G_OBJECT_CLASS (parent_class)->dispose (object);
 }