qtdemux: Fix leak of palette_data in error cases
authorEdward Hervey <bilboed@bilboed.com>
Mon, 12 May 2014 14:56:35 +0000 (16:56 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Mon, 12 May 2014 14:56:35 +0000 (16:56 +0200)
CID #1212151

gst/isomp4/qtdemux.c

index bcf9d52..53847c0 100644 (file)
@@ -7490,8 +7490,10 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
 
     stream->caps =
         qtdemux_video_caps (qtdemux, stream, fourcc, stsd_data, &codec);
-    if (G_UNLIKELY (!stream->caps))
+    if (G_UNLIKELY (!stream->caps)) {
+      g_free (palette_data);
       goto unknown_stream;
+    }
 
     if (codec) {
       list = gst_tag_list_new_empty ();