From 4e4e2f0abf0f90b87816a1ff74a35970619f2fe5 Mon Sep 17 00:00:00 2001 From: Shekhar Chauhan Date: Mon, 13 Mar 2023 09:04:19 +0530 Subject: [PATCH] Fixed memory leak Freeing entrypoints before exit to fix a possible memory leak. Signed-off-by: Shekhar Chauhan --- encode/h264encode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/encode/h264encode.c b/encode/h264encode.c index fa72b89..230df2d 100644 --- a/encode/h264encode.c +++ b/encode/h264encode.c @@ -1165,6 +1165,7 @@ static int init_va(void) /* check the interested configattrib */ if ((attrib[VAConfigAttribRTFormat].value & VA_RT_FORMAT_YUV420) == 0) { printf("Not find desired YUV420 RT format\n"); + free(entrypoints); exit(1); } else { config_attrib[config_attrib_num].type = VAConfigAttribRTFormat;