diff mbox series

selftests/net: Add missing va_end in test_snprintf

Message ID 20241017075251.127762-1-liujing@cmss.chinamobile.com
State New
Headers show
Series selftests/net: Add missing va_end in test_snprintf | expand

Commit Message

liujing Oct. 17, 2024, 7:52 a.m. UTC
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 mbox series

Patch

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;