Skip to contentSkip to conversation

x86: boot: add missing va_end to die

PATCH New Mattias Jacobsson 2 participants 2 messages Nov 28, 2018 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: boot: add missing va_end to die

Each call to va_start must have a corresponding call to va_end before the end of the function. Add the missing va_end.

Found with Coccinelle.

---
 arch/x86/boot/tools/build.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/boot/tools/build.c +1 -0
index d4e6cd4577e5..07223fd42d01 100644
@@ -132,6 +132,7 @@ static void die(const char * str, ...)
 	va_list args;
 	va_start(args, str);
 	vfprintf(stderr, str, args);
+	va_end(args);
 	fputc('\n', stderr);
 	exit(1);
 }
Signature · 1 line
2.19.2
#1 lore raw

[tip:x86/boot] x86/boot: Add missing va_end() to die()

x86/boot: Add missing va_end() to die()
Commit-ID:  69be4efeb959147ff86f22e35aea9526f9b86715
Gitweb:     https://git.kernel.org/tip/69be4efeb959147ff86f22e35aea9526f9b86715
Author:     Mattias Jacobsson <[email protected]>
AuthorDate: Wed, 28 Nov 2018 17:16:07 +0100
Committer:  Borislav Petkov <[email protected]>
CommitDate: Wed, 28 Nov 2018 20:06:07 +0100

x86/boot: Add missing va_end() to die()

Each call to va_start() must have a corresponding call to va_end() before the end of the function. Add the missing va_end().

Found with Coccinelle.

---
 arch/x86/boot/tools/build.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/boot/tools/build.c +1 -0
index bf0e82400358..a93d44e58f9c 100644
@@ -132,6 +132,7 @@ static void die(const char * str, ...)
 	va_list args;
 	va_start(args, str);
 	vfprintf(stderr, str, args);
+	va_end(args);
 	fputc('\n', stderr);
 	exit(1);
 }