diff options
author | Donald Sharp <sharpd@nvidia.com> | 2023-05-22 01:59:41 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-05-22 16:52:54 +0200 |
commit | d9dfbab71c8f508c9d90cd90228a18bb60ea43b9 (patch) | |
tree | ed15cfdc6e38bcd6455dc808ae8fa5167da7e24e /lib | |
parent | zebra: Fix paths that have already de-refed ctx (diff) | |
download | frr-d9dfbab71c8f508c9d90cd90228a18bb60ea43b9.tar.xz frr-d9dfbab71c8f508c9d90cd90228a18bb60ea43b9.zip |
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/printf/glue.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/printf/glue.c b/lib/printf/glue.c index 25e2ff37a..f799378af 100644 --- a/lib/printf/glue.c +++ b/lib/printf/glue.c @@ -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; } |