Commit f42bb0b0 authored by Andreas Schlick's avatar Andreas Schlick Committed by Rusty Russell

failtest: Fix incorrect reuse of va_list in test/run-malloc.c.

parent 1fb8ec90
......@@ -48,8 +48,13 @@ static char *output = NULL;
static int saved_vprintf(const char *fmt, va_list ap)
{
int ret = vsnprintf(NULL, 0, fmt, ap);
int ret;
int len = 0;
va_list ap2;
va_copy(ap2, ap);
ret = vsnprintf(NULL, 0, fmt, ap2);
va_end(ap2);
if (output)
len = strlen(output);
......
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