From fca9d89bbcd45532bc0cc0491d3b3c219d7cc531 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 3 Jan 2022 16:14:31 +0100 Subject: [PATCH] alsactl: fix the error path in set_controls() Signed-off-by: Jaroslav Kysela --- alsactl/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alsactl/state.c b/alsactl/state.c index eea9233..d943df4 100644 --- a/alsactl/state.c +++ b/alsactl/state.c @@ -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);