Browse Source

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 c84ba07db4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.0.2
Michael Niedermayer 9 years ago
parent
commit
512c064cd9
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/mux.c

+ 2
- 1
libavformat/mux.c View File

@@ -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…
Cancel
Save