ucm: fix the error path in parse_toplevel_path()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2020-06-08 09:09:22 +02:00
parent b66d69b72b
commit e1777ee1a1

View file

@ -2048,13 +2048,11 @@ static int parse_toplevel_path(snd_use_case_mgr_t *uc_mgr,
if (dir == NULL) { if (dir == NULL) {
uc_error("Directory is not defined in %s!", filename); uc_error("Directory is not defined in %s!", filename);
free(file); goto __next;
continue;
} }
if (file == NULL) { if (file == NULL) {
uc_error("File is not defined in %s!", filename); uc_error("File is not defined in %s!", filename);
free(dir); goto __next;
continue;
} }
ucm_filename(fn, sizeof(fn), version, dir, file); ucm_filename(fn, sizeof(fn), version, dir, file);
@ -2072,6 +2070,7 @@ static int parse_toplevel_path(snd_use_case_mgr_t *uc_mgr,
goto __ok; goto __ok;
} }
__next:
free(file); free(file);
free(dir); free(dir);
dir = NULL; dir = NULL;