Skip to content

Commit

Permalink
Fixed memory leak
Browse files Browse the repository at this point in the history
Freeing entrypoints before exit to fix a possible memory leak.

Signed-off-by: Shekhar Chauhan <[email protected]>
  • Loading branch information
shekhar-chauhan authored and XinfengZhang committed Jun 4, 2024
1 parent 4f0496a commit 4e4e2f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions encode/h264encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4e4e2f0

Please sign in to comment.