]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsactl: fix the error path in set_controls()
authorJaroslav Kysela <perex@perex.cz>
Mon, 3 Jan 2022 15:14:31 +0000 (16:14 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 3 Jan 2022 15:14:31 +0000 (16:14 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsactl/state.c

index eea923332ee985a910c6cd49f01b39120f17477a..d943df43c199c0c096b19e062f64f123b0a66f06 100644 (file)
@@ -1580,7 +1580,7 @@ static int set_controls(int card, snd_config_t *top, int doit)
        }
 
  _free:
-       if (count >= 0)
+       if (count > 0)
                snd_ctl_elem_list_free_space(list);
  _close:
        snd_ctl_close(handle);