Fix: missing varargs cleanup on error
authorDavid Goulet <dgoulet@efficios.com>
Wed, 12 Mar 2014 18:08:28 +0000 (14:08 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 12 Mar 2014 18:08:28 +0000 (14:08 -0400)
Fixes coverity issue 1191751.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/config/config.c

index 1a32b0b5f0281c03d5e870797ab937c0a356ed8f..c952e8ba29180b4164638802b486c22244b0dd95 100644 (file)
@@ -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);
This page took 0.027283 seconds and 4 git commands to generate.