X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Flibmp3lame.c;h=2beb28e569ee19658247ce86f87c0c4a035c2ddf;hb=6e30b35b85b81c802e52a1078ec7a3097e353c6d;hp=ecdd2e334c6d4edd93ea4fae3d7a043b5fa1b581;hpb=67d466d09b105b2b1d3d8da4c21d8975925741ae;p=ffmpeg diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index ecdd2e334c6..2beb28e569e 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -279,7 +279,6 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, if ((discard_padding < avctx->frame_size) != (avpkt->duration > 0)) { av_log(avctx, AV_LOG_ERROR, "discard padding overflow\n"); av_packet_unref(avpkt); - av_free(avpkt); return AVERROR(EINVAL); } if ((!s->delay_sent && avctx->initial_padding > 0) || discard_padding > 0) { @@ -288,7 +287,6 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, 10); if(!side_data) { av_packet_unref(avpkt); - av_free(avpkt); return AVERROR(ENOMEM); } if (!s->delay_sent) {