From 642a7d1746d5d7c497714caeb9f4dfa4154e82a4 Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Mon, 2 Mar 2020 08:47:54 -0800 Subject: [PATCH] incident_helper: Fix incorrect deletion We match our deletion of memory with how it was allocated. Test: TreeHugger Bug: 150145113 Change-Id: I765e726cd6dbde550fb22f643140f1faba217dfb --- cmds/incident_helper/src/ih_util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/incident_helper/src/ih_util.cpp b/cmds/incident_helper/src/ih_util.cpp index 9439e1d442913..557fe9fc400f2 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) {