avformat/mpeg: move the header_str free into end label
authorSteven Liu <lq@chinaffmpeg.org>
Tue, 22 Oct 2019 02:54:36 +0000 (10:54 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Tue, 22 Oct 2019 02:54:36 +0000 (10:54 +0800)
fix CID: 1454875

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
libavformat/mpeg.c

index df37692..c33401f 100644 (file)
@@ -905,9 +905,9 @@ static int vobsub_read_header(AVFormatContext *s)
         }
         sub_st->codecpar->extradata_size = header.len;
     }
-    av_free(header_str);
-
 end:
+
+    av_free(header_str);
     return ret;
 }