diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-01-05 11:00:12 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-01-06 10:43:34 +0100 |
commit | 49c207b8205bf018bd3afff9b26222178f111bbc (patch) | |
tree | d3e38aeba5125ad175031af68b451997357cb15e /ffprobe.c | |
parent | 9ac58ba1332d882964649c69686091e04f27dd26 (diff) | |
download | ffmpeg-49c207b8205bf018bd3afff9b26222178f111bbc.tar.gz |
ffprobe: fix NULL pointer dereference in writer_close()
Fix crash.
Diffstat (limited to 'ffprobe.c')
-rw-r--r-- | ffprobe.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); } |