From 755c0400606f821111fec76764ddb97243f2ad8f Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 26 May 2020 16:09:03 -0700 Subject: [PATCH] freedreno: Add missing va_end. Fix warning reported by Coverity Scan. Missing varargs init or cleanup (VARARGS) missing_va_end: va_end was not called for ap. Fixes: a0ca1462f317 ("freedreno: add logging infrastructure") Signed-off-by: Vinson Lee Part-of: --- src/gallium/drivers/freedreno/freedreno_log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_log.c b/src/gallium/drivers/freedreno/freedreno_log.c index 8970e40189e..ad4c49eb2ec 100644 --- a/src/gallium/drivers/freedreno/freedreno_log.c +++ b/src/gallium/drivers/freedreno/freedreno_log.c @@ -215,8 +215,10 @@ _fd_log(struct fd_batch *batch, const char *fmt, ...) va_list ap; va_start(ap, fmt); - if (vasprintf(&msg, fmt, ap) < 0) + if (vasprintf(&msg, fmt, ap) < 0) { + va_end(ap); return; + } va_end(ap); u_fifo_add(chunk->msg_fifo, msg); -- 2.30.2