[PATCH] x86/vdso: Move va_end() before exit

From: liujing
Date: Wed Dec 04 2024 - 06:32:13 EST


This patch makes a minor adjustment by moving the va_end call before
exit. Since the exit() function terminates the program, any code
after exit(1) is unreachable and thus notexecuted. Placing va_end
before exit ensures that the va_list is properly cleaned up.

Signed-off-by: liujing <liujing@xxxxxxxxxxxxxxxxxxxx>

diff --git a/arch/x86/entry/vdso/vdso2c.c b/arch/x86/entry/vdso/vdso2c.c
index 90d15f2a7205..4446d74340c8 100644
--- a/arch/x86/entry/vdso/vdso2c.c
+++ b/arch/x86/entry/vdso/vdso2c.c
@@ -114,8 +114,8 @@ static void fail(const char *format, ...)
vfprintf(stderr, format, ap);
if (outfilename)
unlink(outfilename);
- exit(1);
va_end(ap);
+ exit(1);
}

/*
--
2.27.0