diff mbox series

[FFmpeg-devel,03/54] avformat/4xm: Simplify cleanup after read_header failure

Message ID HE1PR0301MB21548011098C39462734F8EC8F309@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit f7fb09cb001d32e55cf280ca8434de0049146552
Headers show
Series [FFmpeg-devel,01/54] avformat: Add internal flags for AV(In|Out)putFormat | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt June 15, 2021, 11:31 p.m. UTC
by setting the FF_FMT_INIT_CLEANUP flag.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/4xm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 427eaaddd0..f918b1fc57 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -283,7 +283,6 @@  static int fourxm_read_header(AVFormatContext *s)
 
     return 0;
 fail:
-    av_freep(&fourxm->tracks);
     av_free(header);
     return ret;
 }
@@ -397,6 +396,7 @@  const AVInputFormat ff_fourxm_demuxer = {
     .name           = "4xm",
     .long_name      = NULL_IF_CONFIG_SMALL("4X Technologies"),
     .priv_data_size = sizeof(FourxmDemuxContext),
+    .flags_internal = FF_FMT_INIT_CLEANUP,
     .read_probe     = fourxm_probe,
     .read_header    = fourxm_read_header,
     .read_packet    = fourxm_read_packet,