Add missing va_end to va_start
authorThomas Miedema <thomasmiedema@gmail.com>
Tue, 17 Feb 2015 14:37:49 +0000 (08:37 -0600)
committerAustin Seipp <austin@well-typed.com>
Tue, 17 Feb 2015 15:06:11 +0000 (09:06 -0600)
Summary: See also ab9711d8.

Reviewers: austin

Reviewed By: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D655

rts/Trace.c

index f28609b..a0783f3 100644 (file)
@@ -702,6 +702,7 @@ static void traceFormatUserMsg(Capability *cap, char *msg, ...)
         }
     }
     dtraceUserMsg(cap->no, msg);
+    va_end(ap);
 }
 
 void traceUserMsg(Capability *cap, char *msg)
@@ -778,6 +779,7 @@ void traceBegin (const char *str, ...)
 
     tracePreface();
     vdebugBelch(str,ap);
+    va_end(ap);
 }
 
 void traceEnd (void)