[FFmpeg-cvslog] avformat/mpeg: move the header_str free into end label

Steven Liu git at videolan.org
Tue Oct 22 06:20:27 EEST 2019


ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Tue Oct 22 10:54:36 2019 +0800| [0b8956b25c2ca3c4f3f2b3b8d36ed6ab177cdae7] | committer: Steven Liu

avformat/mpeg: move the header_str free into end label

fix CID: 1454875

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b8956b25c2ca3c4f3f2b3b8d36ed6ab177cdae7
---

 libavformat/mpeg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index df37692f12..c33401f1a0 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -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;
 }
 



More information about the ffmpeg-cvslog mailing list