conf: fix use after free in _snd_config_load_with_include

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Alex Henrie 2020-12-26 14:35:39 -07:00 committed by Takashi Iwai
parent a9cbfecd87
commit 5275d170e0

View file

@ -1970,7 +1970,9 @@ int _snd_config_load_with_include(snd_config_t *config, snd_input_t *in,
SNDERR("%s:%d:%d:%s", fd->name ? fd->name : "_toplevel_", fd->line, fd->column, str);
goto _end;
}
if (get_char(&input) != LOCAL_UNEXPECTED_EOF) {
err = get_char(&input);
fd = input.current;
if (err != LOCAL_UNEXPECTED_EOF) {
SNDERR("%s:%d:%d:Unexpected }", fd->name ? fd->name : "", fd->line, fd->column);
err = -EINVAL;
goto _end;