[PATCH] selftests/net: Add missing va_end.

zhangjiao2 posted 1 patch 2 months ago
tools/testing/selftests/net/tcp_ao/lib/aolib.h | 1 +
1 file changed, 1 insertion(+)
[PATCH] selftests/net: Add missing va_end.
Posted by zhangjiao2 2 months ago
From: zhang jiao <zhangjiao2@cmss.chinamobile.com>

There is no va_end after va_copy, just add it.

Signed-off-by: zhang jiao <zhangjiao2@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.33.0
Re: [PATCH] selftests/net: Add missing va_end.
Posted by Simon Horman 2 months ago
On Fri, Sep 27, 2024 at 12:00:50PM +0800, zhangjiao2 wrote:
> From: zhang jiao <zhangjiao2@cmss.chinamobile.com>
> 
> There is no va_end after va_copy, just add it.
> 
> Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>

Thanks, this looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>