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 <eric.engestrom@intel.com>
Fixes: 864148d69e "util: add util_vasprintf() for Windows (v2)"
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
This commit is contained in:
Andrii Simiklit 2018-09-06 17:43:52 +03:00 committed by Eric Engestrom
parent 267ed29288
commit 570cacba7a
1 changed files with 1 additions and 1 deletions

View File

@ -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)