summaryrefslogtreecommitdiff
path: root/arch/xtensa/platforms
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2015-07-13 15:42:00 +0300
committerMax Filippov <jcmvbkbc@gmail.com>2015-07-13 15:42:00 +0300
commit72ce6787e37a14f6aaab1a0b024f20440c961517 (patch)
tree71b44a01a95aeb07f92682c4b7af3c62a9828cc6 /arch/xtensa/platforms
parentbc0195aad0daa2ad5b0d76cce22b167bc3435590 (diff)
downloadlinux-72ce6787e37a14f6aaab1a0b024f20440c961517.tar.xz
xtensa: ISS: add missing va_end into split_if_spec
Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/platforms')
-rw-r--r--arch/xtensa/platforms/iss/network.c8
1 files changed, 6 insertions, 2 deletions
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;
}