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>
This commit is contained in:
parent
7626fb6cbf
commit
512c064cd9
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user