From 298bd9d82fa3632cc00f727c673e50064d422d9f Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 1 Nov 2017 10:53:54 +0100 Subject: 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 e3c24529c..7ec4fb26c 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 -- cgit v1.2.1