diff --git a/src/helper/log.c b/src/helper/log.c index 3d4f0389d..694e8a8b2 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -288,6 +288,9 @@ char *alloc_printf(const char *fmt, va_list ap) int ret; ret = vsnprintf(string, size, fmt, ap_copy); + + va_end(ap_copy); + /* NB! The result of the vsnprintf() might be an *EMPTY* string! */ if ((ret >= 0) && ((ret + 1) < size)) break;