projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b31bb39
)
avformat: Make avformat_free_context handle NULL
author
Luca Barbato
<lu_zero@gentoo.org>
Wed, 15 Oct 2014 00:35:55 +0000
(
02:35
+0200)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Mon, 12 Jan 2015 22:58:25 +0000
(23:58 +0100)
Work as the other free()-like functions.
Bug-Id: CID 1087081
CC: libav-stable@libav.org
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
73e3039
..
94431e1
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-2447,6
+2447,9
@@
void avformat_free_context(AVFormatContext *s)
int i, j;
AVStream *st;
+ if (!s)
+ return;
+
av_opt_free(s);
if (s->iformat && s->iformat->priv_class && s->priv_data)
av_opt_free(s->priv_data);