Merge "Va_end should be used with va_start"

am: 5f4808382e

Change-Id: Ie79756bdc9a34b4d5b90057a74a0f6bd0007b655
This commit is contained in:
Mikhail Lappo 2017-06-14 23:08:04 +00:00 committed by android-build-merger
commit 34b7617cb7
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