summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Lappo2017-03-23 16:32:30 -0500
committerMikhail Lappo2017-03-23 16:41:42 -0500
commit90f5d648489ca8304d7c3ca8995e4e0b9ddab6cb (patch)
treebe6f17d5c3bff674d92f441fd80675cc1b0fcb1e /libutils/Printer.cpp
parent26464914feccfce4b835bd73a1130ba5be069e8a (diff)
downloadplatform-system-core-90f5d648489ca8304d7c3ca8995e4e0b9ddab6cb.tar.gz
platform-system-core-90f5d648489ca8304d7c3ca8995e4e0b9ddab6cb.tar.xz
platform-system-core-90f5d648489ca8304d7c3ca8995e4e0b9ddab6cb.zip
Va_end should be used with va_start
va_start is used and va_end should be invoked accordingly Change-Id: Id7037aa8092438b27e445e5147972836602bfd55
Diffstat (limited to 'libutils/Printer.cpp')
-rw-r--r--libutils/Printer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libutils/Printer.cpp b/libutils/Printer.cpp
index 98cd2c66a..84af2930b 100644
--- a/libutils/Printer.cpp
+++ b/libutils/Printer.cpp
@@ -47,9 +47,11 @@ void Printer::printFormatLine(const char* format, ...) {
47#ifndef _WIN32 47#ifndef _WIN32
48 if (vasprintf(&formattedString, format, arglist) < 0) { // returns -1 on error 48 if (vasprintf(&formattedString, format, arglist) < 0) { // returns -1 on error
49 ALOGE("%s: Failed to format string", __FUNCTION__); 49 ALOGE("%s: Failed to format string", __FUNCTION__);
50 va_end(arglist);
50 return; 51 return;
51 } 52 }
52#else 53#else
54 va_end(arglist);
53 return; 55 return;
54#endif 56#endif
55 57