From: Vincent Penquerc'h Date: Thu, 12 Jan 2012 14:34:25 +0000 (+0000) Subject: mpegvideoparser: fix memory leak X-Git-Tag: 1.19.3~507^2~15859^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6edb1a03aefee0006d7d163d28448d1d5cd5140;p=platform%2Fupstream%2Fgstreamer.git mpegvideoparser: fix memory leak --- diff --git a/gst-libs/gst/codecparsers/gstmpegvideoparser.c b/gst-libs/gst/codecparsers/gstmpegvideoparser.c index 009c02bd19..b725d9d353 100644 --- a/gst-libs/gst/codecparsers/gstmpegvideoparser.c +++ b/gst-libs/gst/codecparsers/gstmpegvideoparser.c @@ -332,8 +332,10 @@ gst_mpeg_video_parse (const guint8 * data, gsize size, guint offset) codoffsize->offset = gst_byte_reader_get_pos (&br) + offset; rsize = gst_byte_reader_get_remaining (&br); - if (rsize <= 0) + if (rsize <= 0) { + g_free (codoffsize); break; + } off = scan_for_start_codes (&br, 0, rsize);