diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 30940a128d..c69acc00ef 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -644,7 +644,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out, av_log(avctx, AV_LOG_ERROR, "Data buffer alloc (%"SIZE_SPECIFIER" bytes) failed\n", cx_frame->sz); - av_free(cx_frame); + av_freep(&cx_frame); return AVERROR(ENOMEM); } memcpy(cx_frame->buf, pkt->data.frame.buf, pkt->data.frame.sz);