cbs_h2645: Fix memory leak on when reading SEI fails
authorMark Thompson <sw@jkqxz.net>
Thu, 9 Nov 2017 01:04:30 +0000 (01:04 +0000)
committerMark Thompson <sw@jkqxz.net>
Sun, 12 Nov 2017 16:00:41 +0000 (16:00 +0000)
libavcodec/cbs_h2645.c

index a1b887f..61729cc 100644 (file)
@@ -821,6 +821,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;
             }