ucm: check error value in parse_lookup_query()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-06-02 19:59:10 +02:00
parent 26ab7fc3e4
commit 64a6d4d1e8

View file

@ -224,7 +224,11 @@ static snd_config_t *parse_lookup_query(const char *query)
uc_error("unable to create memory input buffer");
return NULL;
}
snd_config_top(&config);
err = snd_config_top(&config);
if (err < 0) {
snd_input_close(input);
return NULL;
}
err = snd_config_load(config, input);
snd_input_close(input);
if (err < 0) {