From 46f9a6203aa37b0f04a63379cb04304c596dc779 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 1 Jul 2011 02:38:28 +0200 Subject: [PATCH] Fix possible double free when encoding using xvid. (cherry picked from commit 315f0e3fd8dcbd1362276b7407dad2e97cccc4b7) --- libavcodec/libxvidff.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c index bdf70a09df..0bbb7123c9 100644 --- a/libavcodec/libxvidff.c +++ b/libavcodec/libxvidff.c @@ -485,6 +485,7 @@ av_cold int ff_xvid_encode_close(AVCodecContext *avctx) { if( x->twopassbuffer != NULL ) { av_free(x->twopassbuffer); av_free(x->old_twopassbuffer); + avctx->stats_out = NULL; } if( x->twopassfile != NULL ) av_free(x->twopassfile);