mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
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>
This commit is contained in:
parent
bc0195aad0
commit
72ce6787e3
@ -105,13 +105,17 @@ static char *split_if_spec(char *str, ...)
|
|||||||
|
|
||||||
va_start(ap, str);
|
va_start(ap, str);
|
||||||
while ((arg = va_arg(ap, char**)) != NULL) {
|
while ((arg = va_arg(ap, char**)) != NULL) {
|
||||||
if (*str == '\0')
|
if (*str == '\0') {
|
||||||
|
va_end(ap);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
end = strchr(str, ',');
|
end = strchr(str, ',');
|
||||||
if (end != str)
|
if (end != str)
|
||||||
*arg = str;
|
*arg = str;
|
||||||
if (end == NULL)
|
if (end == NULL) {
|
||||||
|
va_end(ap);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
*end++ = '\0';
|
*end++ = '\0';
|
||||||
str = end;
|
str = end;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user