Commit c84ba07d authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mux: Check that deinit is set before calling it

Fixes null pointer dereference
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent dbe1dd59
...@@ -424,6 +424,7 @@ FF_ENABLE_DEPRECATION_WARNINGS ...@@ -424,6 +424,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
} }
if (s->oformat->init && (ret = s->oformat->init(s)) < 0) { if (s->oformat->init && (ret = s->oformat->init(s)) < 0) {
if (s->oformat->deinit)
s->oformat->deinit(s); s->oformat->deinit(s);
goto fail; goto fail;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment