projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a27fd1
)
mpegts: Fix potential memory leak in mpegts_read_packet()
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 8 Sep 2012 02:32:25 +0000
(
04:32
+0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 8 Sep 2012 03:21:47 +0000
(
05:21
+0200)
This leak can happen in case of some error paths.
Found-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpegts.c
patch
|
blob
|
history
diff --git
a/libavformat/mpegts.c
b/libavformat/mpegts.c
index
4492c5b
..
04e10b6
100644
(file)
--- 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) {