[FFmpeg-devel] [PATCH] oggdec: fix invalid free on error

wm4 nfxjfg at googlemail.com
Sat Aug 30 15:39:15 CEST 2014


The read_packet callback passes a pointer to a stack-allocated AVPacket.
Attempting to free it with av_free() makes no sense.
---
Found by looking at the code; there's no sample file.
---
 libavformat/oggdec.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index f17393b..8f146e4 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -817,7 +817,6 @@ retry:
     return psize;
 fail:
     av_free_packet(pkt);
-    av_free(pkt);
     return AVERROR(ENOMEM);
 }
 
-- 
2.1.0.rc1



More information about the ffmpeg-devel mailing list