Skip to content
Snippets Groups Projects
Commit 5710dbf8 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 9a27fd12
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment