aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-04-24 12:07:37 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-04-24 12:40:58 +0200
commit512c064cd9e064fccd5809bc0928822a7324373d (patch)
treeb7e05e0c5b9f4b6c42b0c398cf9d79cd203a6710
parent7626fb6cbf5f4755c3f7591e99ca475dfadf4c7c (diff)
downloadffmpeg-512c064cd9e064fccd5809bc0928822a7324373d.tar.gz
avformat/mux: Check that deinit is set before calling it
Fixes null pointer dereference Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c84ba07db4abd123b2ad93784e312a24d9341553) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 789c811cd8..f14bfd52d5 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -400,7 +400,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
if (s->oformat->init && (ret = s->oformat->init(s)) < 0) {
- s->oformat->deinit(s);
+ if (s->oformat->deinit)
+ s->oformat->deinit(s);
goto fail;
}