summaryrefslogtreecommitdiff
path: root/libavformat
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:07:37 +0200
commitc84ba07db4abd123b2ad93784e312a24d9341553 (patch)
tree9da63f0b20e607cc6cdc3c58e1fbe1563af23375 /libavformat
parentdbe1dd59e0d3650fceb612ab8720f54847b1508c (diff)
avformat/mux: Check that deinit is set before calling it
Fixes null pointer dereference Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 6239fd192d..91388e3790 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -424,7 +424,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;
}