summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kaiser <gkaiser@google.com>2020-03-02 08:47:54 -0800
committerGreg Kaiser <gkaiser@google.com>2020-03-02 20:49:08 +0000
commit642a7d1746d5d7c497714caeb9f4dfa4154e82a4 (patch)
treeae11a9346f591b3bbab2fd6647b661e20e09c387
parenta38ba93e264600c6b2485c5260b28a6f6fc744fd (diff)
incident_helper: Fix incorrect deletion
We match our deletion of memory with how it was allocated. Test: TreeHugger Bug: 150145113 Change-Id: I765e726cd6dbde550fb22f643140f1faba217dfb
-rw-r--r--cmds/incident_helper/src/ih_util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/incident_helper/src/ih_util.cpp b/cmds/incident_helper/src/ih_util.cpp
index 9439e1d44291..557fe9fc400f 100644
--- a/cmds/incident_helper/src/ih_util.cpp
+++ b/cmds/incident_helper/src/ih_util.cpp
@@ -244,7 +244,7 @@ Reader::Reader(const int fd)
Reader::~Reader()
{
if (mFile != nullptr) fclose(mFile);
- free(mBuffer);
+ delete[] mBuffer;
}
bool Reader::readLine(std::string* line) {