[FFmpeg-cvslog] avcodec/mjpegenc: use av_freep(), avoid leaving stale pointers in memory
Michael Niedermayer
git at videolan.org
Fri Oct 31 13:41:14 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Oct 31 13:36:19 2014 +0100| [0c6c5d7bcb1b616161a98356495adaeed2568dda] | committer: Michael Niedermayer
avcodec/mjpegenc: use av_freep(), avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c6c5d7bcb1b616161a98356495adaeed2568dda
---
libavcodec/mjpegenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 0fb3a17..14701e2 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)
More information about the ffmpeg-cvslog
mailing list