From: Benoit Fouet Date: Fri, 21 Nov 2014 08:45:42 +0000 (+0100) Subject: ffplay: fix mem leak when opening input or parsing options fail. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=90c9b494052e6110f43f3db8cc8f6720550b397b;p=ffmpeg ffplay: fix mem leak when opening input or parsing options fail. Reviewed-by: Marton Balint Signed-off-by: Michael Niedermayer --- diff --git a/ffplay.c b/ffplay.c index f79161dd006..1914a6692f2 100644 --- a/ffplay.c +++ b/ffplay.c @@ -3169,8 +3169,9 @@ static int read_thread(void *arg) stream_component_close(is, is->video_stream); if (is->subtitle_stream >= 0) stream_component_close(is, is->subtitle_stream); - if (is->ic) { - avformat_close_input(&is->ic); + if (ic) { + avformat_close_input(&ic); + is->ic = NULL; } if (ret != 0) {