From: David Goulet Date: Wed, 12 Mar 2014 18:08:28 +0000 (-0400) Subject: Fix: missing varargs cleanup on error X-Git-Tag: v2.5.0-rc1~113 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6c043b48abd501f7df3e63662fe227e71e00c812;p=lttng-tools.git Fix: missing varargs cleanup on error Fixes coverity issue 1191751. Signed-off-by: David Goulet --- diff --git a/src/common/config/config.c b/src/common/config/config.c index 1a32b0b5f..c952e8ba2 100644 --- a/src/common/config/config.c +++ b/src/common/config/config.c @@ -540,11 +540,11 @@ void xml_error_handler(void *ctx, const char *format, ...) va_start(args, format); ret = vasprintf(&errMsg, format, args); + va_end(args); if (ret == -1) { ERR("String allocation failed in xml error handler"); return; } - va_end(args); fprintf(stderr, "XML Error: %s", errMsg); free(errMsg);