[FFmpeg-cvslog] mpegts: Fix potential memory leak in mpegts_read_packet()
Michael Niedermayer
git at videolan.org
Sat Sep 8 05:31:49 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Sep 8 04:32:25 2012 +0200| [5710dbf88cd56e7fbee7ad70240f92fe82ce6566] | committer: Michael Niedermayer
mpegts: Fix potential memory leak in mpegts_read_packet()
This leak can happen in case of some error paths.
Found-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5710dbf88cd56e7fbee7ad70240f92fe82ce6566
---
libavformat/mpegts.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 4492c5b..04e10b6 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2066,6 +2066,7 @@ static int mpegts_read_packet(AVFormatContext *s,
ts->pkt = pkt;
ret = handle_packets(ts, 0);
if (ret < 0) {
+ av_free_packet(ts->pkt);
/* flush pes data left */
for (i = 0; i < NB_PID_MAX; i++) {
if (ts->pids[i] && ts->pids[i]->type == MPEGTS_PES) {
More information about the ffmpeg-cvslog
mailing list