uri: Fix memory leak in gst_uri_join()
authorSebastian Dröge <sebastian@centricular.com>
Mon, 29 Sep 2014 09:19:35 +0000 (12:19 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 29 Sep 2014 09:19:35 +0000 (12:19 +0300)
The merged path segments are a deep-copied list and we need to free the
contained strings too instead of just the list nodes themselves.

gst/gsturi.c

index 219e6b3..1a88b5a 100644 (file)
@@ -1748,7 +1748,7 @@ gst_uri_join (GstUri * base_uri, GstUri * ref_uri)
         else {
           GList *mrgd = _merge (base_uri->path, ref_uri->path);
           t->path = _remove_dot_segments (mrgd);
-          g_list_free (mrgd);
+          g_list_free_full (mrgd, g_free);
         }
         t->query = _gst_uri_copy_query_table (ref_uri->query);
       }