Mesa (staging/18.1): mesa/util: add missing va_end() after va_copy()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 7 15:23:05 UTC 2018


Module: Mesa
Branch: staging/18.1
Commit: 102bc8402391664b305c37e8e5506c740692b1dc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=102bc8402391664b305c37e8e5506c740692b1dc

Author: Andrii Simiklit <andrii.simiklit at globallogic.com>
Date:   Thu Sep  6 17:43:54 2018 +0300

mesa/util: add missing va_end() after va_copy()

MSDN:
"va_end must be called on each argument list that's initialized
 with va_start or va_copy before the function returns."

Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107810
Fixes: c6267ebd6c8a "gallium/util: Stop bundling our snprintf implementation."
Signed-off-by: Andrii Simiklit <andrii.simiklit at globallogic.com>
(cherry picked from commit 2930b76cfe1e13e84ac0d88f9c6d709a5a8d4c18)

---

 src/util/u_string.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/u_string.h b/src/util/u_string.h
index fb43ed0afc..e408146645 100644
--- a/src/util/u_string.h
+++ b/src/util/u_string.h
@@ -81,6 +81,7 @@ util_vsnprintf(char *str, size_t size, const char *format, va_list ap)
    if (ret < 0) {
       ret = _vscprintf(format, ap_copy);
    }
+   va_end(ap_copy);
    return ret;
 }
 




More information about the mesa-commit mailing list