From: Jaroslav Kysela Date: Mon, 8 Jun 2020 07:09:22 +0000 (+0200) Subject: ucm: fix the error path in parse_toplevel_path() X-Git-Tag: v1.2.3~7 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=e1777ee1a13c5c828939e8cc87672e53d80a68f0;p=alsa-lib.git ucm: fix the error path in parse_toplevel_path() Signed-off-by: Jaroslav Kysela --- diff --git a/src/ucm/parser.c b/src/ucm/parser.c index e4365972..1d0874d2 100644 --- a/src/ucm/parser.c +++ b/src/ucm/parser.c @@ -2048,13 +2048,11 @@ static int parse_toplevel_path(snd_use_case_mgr_t *uc_mgr, if (dir == NULL) { uc_error("Directory is not defined in %s!", filename); - free(file); - continue; + goto __next; } if (file == NULL) { uc_error("File is not defined in %s!", filename); - free(dir); - continue; + goto __next; } 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; } +__next: free(file); free(dir); dir = NULL;