Skip to content

Commit f8f1c1b

Browse files
evelikov-workXinfengZhang
authored andcommitted
va: don't leak driver names, when override is set
Fixes: 4f5a434 ("va: add vaGetDriverNames() internal ABI") Signed-off-by: Emil Velikov <[email protected]>
1 parent 1c58941 commit f8f1c1b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

va/va.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,9 @@ static VAStatus va_new_opendriver(VADisplay dpy)
698698
const char *driver = ctx->override_driver_name ?
699699
ctx->override_driver_name : driver_name_env;
700700

701+
for (unsigned int i = 0; i < num_drivers; i++)
702+
free(drivers[i]);
703+
701704
drivers[0] = strdup(driver);
702705
num_drivers = 1;
703706

0 commit comments

Comments
 (0)