commit | bc635a57f381b91c01ee4f3b5defcbf093f09ea3 | [log] [tgz] |
---|---|---|
author | Greg Kaiser <gkaiser@google.com> | Mon Sep 24 06:12:09 2018 -0700 |
committer | Greg Kaiser <gkaiser@google.com> | Mon Sep 24 06:12:09 2018 -0700 |
tree | 5d2a89f676bf0718692a2b9db1b28855e4680af9 | |
parent | e2ea26c8b5212bc44d943397c82b29430be600bf [diff] |
trace_processor: Fix deallocation mismatch When GetLine() returns a "new char[1024]", we need to use the delete[] operator to deallocate the memory. Test: TreeHugger Change-Id: I34a92033c2dfc615ad8f27e44b348de28dfdf60b
diff --git a/src/trace_processor/trace_processor_shell.cc b/src/trace_processor/trace_processor_shell.cc index fd8af99..2ee3e27 100644 --- a/src/trace_processor/trace_processor_shell.cc +++ b/src/trace_processor/trace_processor_shell.cc
@@ -71,7 +71,7 @@ void SetupLineEditor() {} void FreeLine(char* line) { - free(line); + delete[] line; } char* GetLine(const char* prompt) {