avdemux: Fix string memory leaks
authorVineeth TM <vineeth.tm@samsung.com>
Mon, 2 Nov 2015 01:20:02 +0000 (10:20 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 2 Nov 2015 07:22:37 +0000 (09:22 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=757454

ext/libav/gstavdemux.c

index cdb7a4c..b87d781 100644 (file)
@@ -212,6 +212,7 @@ gst_ffmpegdemux_base_init (GstFFMpegDemuxClass * klass)
   sinkcaps = gst_ffmpeg_formatid_to_caps (name);
   sinktempl = gst_pad_template_new ("sink",
       GST_PAD_SINK, GST_PAD_ALWAYS, sinkcaps);
+  g_free (name);
   videosrctempl = gst_pad_template_new ("video_%u",
       GST_PAD_SRC, GST_PAD_SOMETIMES, GST_CAPS_ANY);
   audiosrctempl = gst_pad_template_new ("audio_%u",
@@ -2116,6 +2117,8 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
       g_warning ("Register of type avdemux_%s failed", name);
       g_free (type_name);
       g_free (typefind_name);
+      g_free (extensions);
+      g_free (name);
       return FALSE;
     }