Mesa (master): freedreno: Add missing va_end.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed May 27 00:30:08 UTC 2020
Module: Mesa
Branch: master
Commit: 755c0400606f821111fec76764ddb97243f2ad8f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=755c0400606f821111fec76764ddb97243f2ad8f
Author: Vinson Lee <vlee at freedesktop.org>
Date: Tue May 26 16:09:03 2020 -0700
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 <vlee at freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5221>
---
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);
More information about the mesa-commit
mailing list