oggdec: fix invalid free on error
authorwm4 <nfxjfg@googlemail.com>
Sat, 30 Aug 2014 13:39:15 +0000 (15:39 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 20 Sep 2014 16:40:32 +0000 (18:40 +0200)
The read_packet callback passes a pointer to a stack-allocated AVPacket.
Attempting to free it with av_free() makes no sense.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b173f5c15572cc82f68128599722e689df4ff137)

Conflicts:

libavformat/oggdec.c

libavformat/oggdec.c

index fd18e99..cf5d50d 100644 (file)
@@ -795,7 +795,6 @@ retry:
                                                      10);
         if(side_data == NULL) {
             av_free_packet(pkt);
-            av_free(pkt);
             return AVERROR(ENOMEM);
         }
         AV_WL32(side_data + 4, os->end_trimming);