Commit 49c207b8 authored by Stefano Sabatini's avatar Stefano Sabatini

ffprobe: fix NULL pointer dereference in writer_close()

Fix crash.
parent 9ac58ba1
......@@ -178,9 +178,11 @@ static const AVClass writer_class = {
static void writer_close(WriterContext **wctx)
{
if (*wctx && (*wctx)->writer->uninit)
(*wctx)->writer->uninit(*wctx);
if (!*wctx)
return;
if ((*wctx)->writer->uninit)
(*wctx)->writer->uninit(*wctx);
av_freep(&((*wctx)->priv));
av_freep(wctx);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment