Commit 570cacba authored by Andrii Simiklit's avatar Andrii Simiklit Committed by Eric Engestrom

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's avatarEric Engestrom <>
Fixes: 864148d6 "util: add util_vasprintf() for Windows (v2)"
Signed-off-by: default avatarAndrii Simiklit <>
parent 267ed292
......@@ -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);
if (r < 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment