mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 11:50:21 +00:00
lib: va_end must be called
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>
This commit is contained in:
parent
d7c9666e06
commit
d9dfbab71c
@ -273,6 +273,7 @@ static ssize_t printfrr_va(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
{
|
||||
const struct va_format *vaf = ptr;
|
||||
va_list ap;
|
||||
ssize_t s;
|
||||
|
||||
if (!vaf || !vaf->fmt || !vaf->va)
|
||||
return bputs(buf, "NULL");
|
||||
@ -285,6 +286,9 @@ static ssize_t printfrr_va(struct fbuf *buf, struct printfrr_eargs *ea,
|
||||
#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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user