]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm: check error value in parse_lookup_query()
authorJaroslav Kysela <perex@perex.cz>
Wed, 2 Jun 2021 17:59:10 +0000 (19:59 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 2 Jun 2021 17:59:10 +0000 (19:59 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/ucm_subs.c

index c56730c5767922773b28754e35f87ff4d99dd840..0bc4e63f41527efddf031a2556e1855fc9433fe3 100644 (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) {