From 0c6c5d7bcb1b616161a98356495adaeed2568dda Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 31 Oct 2014 13:36:19 +0100 Subject: [PATCH] avcodec/mjpegenc: use av_freep(), avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer --- libavcodec/mjpegenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 0fb3a17fc3..14701e22f4 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -78,7 +78,7 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s) void ff_mjpeg_encode_close(MpegEncContext *s) { - av_free(s->mjpeg_ctx); + av_freep(&s->mjpeg_ctx); } static void encode_block(MpegEncContext *s, int16_t *block, int n)