gst-inspect: Fix memory leak
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 27 Jan 2012 18:00:03 +0000 (19:00 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 27 Jan 2012 18:00:03 +0000 (19:00 +0100)
tools/gst-inspect.c

index d776594..fe5b98d 100644 (file)
@@ -1107,6 +1107,7 @@ print_all_uri_handlers (void)
         if (!element) {
           g_print ("couldn't construct element for %s for some reason\n",
               GST_OBJECT_NAME (factory));
+          gst_object_unref (factory);
           continue;
         }
 
@@ -1140,6 +1141,7 @@ print_all_uri_handlers (void)
         }
 
         gst_object_unref (element);
+        gst_object_unref (factory);
       }
     }