vorbistag: Fix leak in error case
authorEdward Hervey <edward@centricular.com>
Wed, 1 Nov 2017 09:53:54 +0000 (10:53 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Wed, 1 Nov 2017 09:53:54 +0000 (10:53 +0100)
Don't leak the vendor_string on error cases

gst-libs/gst/tag/gstvorbistag.c

index e3c2452..7ec4fb2 100644 (file)
@@ -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