From: Vinson Lee Date: Tue, 26 May 2020 23:09:03 +0000 (-0700) Subject: freedreno: Add missing va_end. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=755c0400606f821111fec76764ddb97243f2ad8f;p=mesa.git 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: --- 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);