[libav-devel] [PATCH 08/14] cbs_h2645: Fix memory leak on when reading SEI fails

Mark Thompson sw at jkqxz.net
Thu Nov 9 02:07:50 CET 2017


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

diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index 52b61eb61..e3b5bf618 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, &bc, sei);
             if (err < 0) {
                 cbs_h264_free_sei(sei);
+                av_free(sei);
                 return err;
             }
 
-- 
2.11.0



More information about the libav-devel mailing list