From 8e867aefe0f7041b1fcf6947604a807717c4450c Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 1 Nov 2017 10:53:54 +0100 Subject: [PATCH] vorbistag: Fix leak in error case Don't leak the vendor_string on error cases --- gst-libs/gst/tag/gstvorbistag.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst-libs/gst/tag/gstvorbistag.c b/gst-libs/gst/tag/gstvorbistag.c index e3c2452..7ec4fb2 100644 --- a/gst-libs/gst/tag/gstvorbistag.c +++ b/gst-libs/gst/tag/gstvorbistag.c @@ -489,6 +489,10 @@ gst_tag_list_from_vorbiscomment (const guint8 * data, gsize size, return list; error: + if (vendor_string && *vendor_string) { + g_free (*vendor_string); + *vendor_string = NULL; + } gst_tag_list_unref (list); return NULL; #undef ADVANCE -- 2.7.4