summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrii Simiklit <[email protected]>2018-09-06 17:43:52 +0300
committerEric Engestrom <[email protected]>2018-09-06 17:33:27 +0100
commit570cacba7af165175ad40820c5e663db5b1c5066 (patch)
tree2908379217b31ac0ea69d75a4dbfa6f6719db76f
parent267ed29288db478a47d180bd1370a4df60ddb3ef (diff)
mesa/util: don't use the same 'va_list' instance twice
The first usage of the 'va_list' instance could change it. Reviewed-by: Eric Engestrom <[email protected]> Fixes: 864148d69e1e "util: add util_vasprintf() for Windows (v2)" Signed-off-by: Andrii Simiklit <[email protected]>
-rw-r--r--src/util/u_string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/u_string.h b/src/util/u_string.h
index ce454308d7b..374c00e0bcb 100644
--- a/src/util/u_string.h
+++ b/src/util/u_string.h
@@ -119,7 +119,7 @@ util_vasprintf(char **ret, const char *format, va_list ap)
/* Compute length of output string first */
va_copy(ap_copy, ap);
- int r = util_vsnprintf(NULL, 0, format, ap);
+ int r = util_vsnprintf(NULL, 0, format, ap_copy);
va_end(ap_copy);
if (r < 0)