1 |
From 4ddc689d6815db8d226897b9037378fca753f8aa Mon Sep 17 00:00:00 2001 |
2 |
From: Andrii Simiklit <andrii.simiklit@globallogic.com> |
3 |
Date: Thu, 6 Sep 2018 17:43:54 +0300 |
4 |
Subject: [PATCH 09/20] mesa/util: add missing va_end() after va_copy() |
5 |
|
6 |
MSDN: |
7 |
"va_end must be called on each argument list that's initialized |
8 |
with va_start or va_copy before the function returns." |
9 |
|
10 |
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> |
11 |
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107810 |
12 |
Fixes: c6267ebd6c8a "gallium/util: Stop bundling our snprintf implementation." |
13 |
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com> |
14 |
(cherry picked from commit 2930b76cfe1e13e84ac0d88f9c6d709a5a8d4c18) |
15 |
--- |
16 |
src/util/u_string.h | 1 + |
17 |
1 file changed, 1 insertion(+) |
18 |
|
19 |
diff --git a/src/util/u_string.h b/src/util/u_string.h |
20 |
index fb43ed0afc..e408146645 100644 |
21 |
--- a/src/util/u_string.h |
22 |
+++ b/src/util/u_string.h |
23 |
@@ -81,6 +81,7 @@ util_vsnprintf(char *str, size_t size, const char *format, va_list ap) |
24 |
if (ret < 0) { |
25 |
ret = _vscprintf(format, ap_copy); |
26 |
} |
27 |
+ va_end(ap_copy); |
28 |
return ret; |
29 |
} |
30 |
|
31 |
-- |
32 |
2.18.0 |
33 |
|