Merge "Va_end should be used with va_start"

This commit is contained in:
Treehugger Robot 2017-06-14 23:00:40 +00:00 committed by Gerrit Code Review
commit 5f4808382e
3 changed files with 4 additions and 0 deletions

View file

@ -555,6 +555,7 @@ static void db_printf(const char* fmt, ...)
} else {
vprintf(fmt, argp);
}
va_end(argp);
}
/*

View file

@ -562,6 +562,7 @@ static void db_printf(const char* fmt, ...)
} else {
vprintf(fmt, argp);
}
va_end(argp);
}

View file

@ -47,9 +47,11 @@ void Printer::printFormatLine(const char* format, ...) {
#ifndef _WIN32
if (vasprintf(&formattedString, format, arglist) < 0) { // returns -1 on error
ALOGE("%s: Failed to format string", __FUNCTION__);
va_end(arglist);
return;
}
#else
va_end(arglist);
return;
#endif