According to the man page a va_start must be followed by
a va_end before the end of the function.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
{
const struct va_format *vaf = ptr;
va_list ap;
+ ssize_t s;
if (!vaf || !vaf->fmt || !vaf->va)
return bputs(buf, "NULL");
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
/* can't format check this */
- return vbprintfrr(buf, vaf->fmt, ap);
+ s = vbprintfrr(buf, vaf->fmt, ap);
#pragma GCC diagnostic pop
+ va_end(ap);
+
+ return s;
}