avcodec/mjpegenc: use av_freep(), avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-10-31 13:36:19 +01:00
parent d15a94ba20
commit 0c6c5d7bcb
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s)
void ff_mjpeg_encode_close(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) static void encode_block(MpegEncContext *s, int16_t *block, int n)