netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/net: Add missing va_end in test_snprintf
@ 2024-10-17  7:52 Liu Jing
  2024-10-19  7:57 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Jing @ 2024-10-17  7:52 UTC (permalink / raw)
  To: davem
  Cc: edumazet, kuba, pabeni, shuah, 0x7f454c46, netdev,
	linux-kselftest, linux-kernel, Liu Jing, Liu Jing

There is no va_end after va_copy, just add it.

Signed-off-by: Liu Jing <liujing_yewu@cmss.chinamobile.com>
Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
---
 tools/testing/selftests/net/tcp_ao/lib/aolib.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/net/tcp_ao/lib/aolib.h b/tools/testing/selftests/net/tcp_ao/lib/aolib.h
index db44e77428dd..5db2f65cddc4 100644
--- a/tools/testing/selftests/net/tcp_ao/lib/aolib.h
+++ b/tools/testing/selftests/net/tcp_ao/lib/aolib.h
@@ -46,6 +46,7 @@ static inline char *test_snprintf(const char *fmt, va_list vargs)
 
 	va_copy(tmp, vargs);
 	n = vsnprintf(ret, size, fmt, tmp);
+	va_end(tmp);
 	if (n < 0)
 		return NULL;
 
-- 
2.27.0




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-19  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17  7:52 [PATCH] selftests/net: Add missing va_end in test_snprintf Liu Jing
2024-10-19  7:57 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).