[FFmpeg-cvslog] cbs_h264: Fix memory leak in error case

Mark Thompson git at videolan.org
Wed Oct 18 22:08:36 EEST 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Wed Oct 18 19:37:30 2017 +0100| [41272e112b389e61b875ba2372a64a251f1da9fc] | committer: Mark Thompson

cbs_h264: Fix memory leak in error case

Fixes CID 1419834.

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

 libavcodec/cbs_h2645.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index 9039e0f6f4..742857bd19 100644
--- a/libavcodec/cbs_h2645.c
+++ b/libavcodec/cbs_h2645.c
@@ -824,6 +824,7 @@ static int cbs_h264_read_nal_unit(CodedBitstreamContext *ctx,
             err = cbs_h264_read_sei(ctx, &gbc, sei);
             if (err < 0) {
                 cbs_h264_free_sei(sei);
+                av_free(sei);
                 return err;
             }
 



More information about the ffmpeg-cvslog mailing list