From: Max Filippov Date: Mon, 13 Jul 2015 12:42:00 +0000 (+0300) Subject: xtensa: ISS: add missing va_end into split_if_spec X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=72ce6787e37a14f6aaab1a0b024f20440c961517;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git xtensa: ISS: add missing va_end into split_if_spec Reported-by: David Binderman Signed-off-by: Max Filippov --- diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c index 8ab021b1f141..976a38594537 100644 --- a/arch/xtensa/platforms/iss/network.c +++ b/arch/xtensa/platforms/iss/network.c @@ -105,13 +105,17 @@ static char *split_if_spec(char *str, ...) va_start(ap, str); while ((arg = va_arg(ap, char**)) != NULL) { - if (*str == '\0') + if (*str == '\0') { + va_end(ap); return NULL; + } end = strchr(str, ','); if (end != str) *arg = str; - if (end == NULL) + if (end == NULL) { + va_end(ap); return NULL; + } *end++ = '\0'; str = end; }