fixed some memory safety bugs
diff --git a/aos/common/logging/logging_interface.cc b/aos/common/logging/logging_interface.cc
index b4244fb..ae8cc01 100644
--- a/aos/common/logging/logging_interface.cc
+++ b/aos/common/logging/logging_interface.cc
@@ -68,7 +68,10 @@
                                int levels) {
   internal::RunWithCurrentImplementation(
       levels, [&](LogImplementation * implementation) {
-    implementation->DoLog(level, format, ap);
+    va_list ap1;
+    va_copy(ap1, ap);
+    implementation->DoLog(level, format, ap1);
+    va_end(ap1);
 
     if (level == FATAL) {
       VDie(format, ap);