Fix vasprintf implementation

A va_copy call must be followed by a va_end call.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
This commit is contained in:
Samanta Navarro 2023-05-05 11:57:18 +00:00
parent 812eb5b840
commit c483196dd4

View File

@ -124,8 +124,8 @@ static int vasprintf(char **strp, const char *fmt, va_list va)
va_list vacopy;
va_copy(vacopy, va);
length = vsnprintf(NULL, 0, fmt, vacopy);
va_end(vacopy);
if (length < 0)
return length;