Fix the issue where resources may not be released correctly ,memory leak or other undefined behavio

Change-Id: I5d2b6a63977b86aab364ebc4d27080f2398c744c
diff --git a/mbtk/libmbtk_lib/common/mbtk_log.c b/mbtk/libmbtk_lib/common/mbtk_log.c
index 11ec8fd..fcdf0b1 100755
--- a/mbtk/libmbtk_lib/common/mbtk_log.c
+++ b/mbtk/libmbtk_lib/common/mbtk_log.c
@@ -92,6 +92,7 @@
     va_start(ap, format);
     length = vsnprintf(buf, sizeof(buf), format, ap);
     if (length < 0 || 0 == length) {
+        va_end(ap);
         return;
     }