From: Thibault Saunier Date: Sat, 8 Jun 2019 02:29:10 +0000 (-0400) Subject: discoverer: Plug some leaks in the cache loading path X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0ebd29a1761a9495db71c5d332e79d8a9feb528;p=platform%2Fupstream%2Fgst-plugins-base.git discoverer: Plug some leaks in the cache loading path --- diff --git a/gst-libs/gst/pbutils/gstdiscoverer-types.c b/gst-libs/gst/pbutils/gstdiscoverer-types.c index 0f0d0b9..e921eef 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer-types.c +++ b/gst-libs/gst/pbutils/gstdiscoverer-types.c @@ -377,6 +377,8 @@ gst_discoverer_info_finalize (GObject * object) if (info->toc) gst_toc_unref (info->toc); + g_free (info->cachefile); + g_ptr_array_unref (info->missing_elements_details); } diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index dc43554..5598915 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -1526,6 +1526,7 @@ discoverer_collect (GstDiscoverer * dc) g_file_set_contents (dc->priv->current_info->cachefile, g_variant_get_data (variant), g_variant_get_size (variant), NULL); + g_variant_unref (variant); } if (dc->priv->async) @@ -1813,6 +1814,7 @@ _serialized_info_get_path (GstDiscoverer * dc, gchar * uri) res = g_build_filename (cache_dir, &checksum[2], NULL); done: + g_checksum_free (cs); g_free (cache_dir); g_free (location); g_free (tmp); @@ -1842,6 +1844,7 @@ _get_info_from_cachefile (GstDiscoverer * dc, gchar * cachefile) } GST_INFO_OBJECT (dc, "Got info from cache: %p", info); + g_free (data); return info; }