apple/glx/log: added missing va_end() after va_copy()
authorAndrii Simiklit <andrii.simiklit@globallogic.com>
Thu, 6 Sep 2018 14:43:51 +0000 (17:43 +0300)
committerEric Engestrom <eric.engestrom@intel.com>
Thu, 6 Sep 2018 16:33:27 +0000 (17:33 +0100)
Each invocation of va_copy() must be matched by a
corresponding invocation of va_end()

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Fixes: 51691f0767f6 "darwin: Use ASL for logging"
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
src/glx/apple/apple_glx_log.c

index a3f446c26f2fa42b0126d795fd27e9f60263c308..ea39d30954e604aa085c4a7438f1b73a24cfda2f 100644 (file)
@@ -97,6 +97,7 @@ void _apple_glx_vlog(int level, const char *file, const char *function,
         fprintf(stderr, "%-9s %24s:%-4d %s(%"PRIu64"): ",
                 _asl_level_string(level), file, line, function, thread);
         vfprintf(stderr, fmt, args2);
         fprintf(stderr, "%-9s %24s:%-4d %s(%"PRIu64"): ",
                 _asl_level_string(level), file, line, function, thread);
         vfprintf(stderr, fmt, args2);
+        va_end(args2);
     }
 
     msg = asl_new(ASL_TYPE_MSG);
     }
 
     msg = asl_new(ASL_TYPE_MSG);