Fix various unlikely, but still potential memoryleaks in error code paths
[platform/upstream/gstreamer.git] / gst-libs / gst / pbutils / gstdiscoverer-types.c
index 0d48a3d..1f658c9 100644 (file)
@@ -372,11 +372,13 @@ GstDiscovererInfo *
 gst_discoverer_info_copy (GstDiscovererInfo * ptr)
 {
   GstDiscovererInfo *ret;
-  GHashTable *stream_map = g_hash_table_new (g_direct_hash, NULL);
+  GHashTable *stream_map;
   GList *tmp;
 
   g_return_val_if_fail (ptr != NULL, NULL);
 
+  stream_map = g_hash_table_new (g_direct_hash, NULL);
+
   ret = gst_discoverer_info_new ();
 
   ret->uri = g_strdup (ptr->uri);