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: a0ca1462f3 ("freedreno: add logging infrastructure")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5221>
(cherry picked from commit 755c040060)
This commit is contained in:
Vinson Lee 2020-05-26 16:09:03 -07:00 committed by Eric Engestrom
parent 9b3aa87227
commit f9c4314d35
2 changed files with 4 additions and 2 deletions

View file

@ -76,7 +76,7 @@
"description": "freedreno: Add missing va_end.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "a0ca1462f31747d028abe9106309f6c95c3daabf"
},

View file

@ -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);