From fb2d74c375675a7a85caacdf75a999c809f3a7c5 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Fri, 12 Jun 2020 13:19:45 +0900 Subject: [PATCH] ctl: card: fix uninitialized local value Fixes: eace1901a13e ("ctl: card: add an API to add/replace user-defined elements") Signed-off-by: Takashi Sakamoto --- src/ctl/card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ctl/card.c b/src/ctl/card.c index c99a096..0d29003 100644 --- a/src/ctl/card.c +++ b/src/ctl/card.c @@ -574,6 +574,7 @@ static int prepare_enum_names(struct snd_ctl_elem_info *info, const gchar **labe unsigned int length; char *pos; + length = 0; for (count = 0; labels[count] != NULL; ++count) { const gchar *label = labels[count]; -- 2.47.3