diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-20 19:48:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-20 20:13:18 +0200 |
commit | ee23dcf534801931c13f9f534586b56e231d3085 (patch) | |
tree | be2877c0ec85dd344d88f127659638455dcb36f6 /libavformat/utils.c | |
parent | 830f7f189f7b41221b29d40e8127cf54a140ae86 (diff) | |
download | ffmpeg-ee23dcf534801931c13f9f534586b56e231d3085.tar.gz |
avformat_free_context: allow NULL as argument
Fixes CID703682
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index be1be00b76..f27104e75a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3018,6 +3018,9 @@ void avformat_free_context(AVFormatContext *s) { int i; + if (!s) + return; + av_opt_free(s); if (s->iformat && s->iformat->priv_class && s->priv_data) av_opt_free(s->priv_data); |