summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsattdeepan.d <sattdeepan.d@samsung.com>2020-05-15 11:28:03 +0530
committerSeungha Son <seungha.son@samsung.com>2020-05-18 15:42:30 +0900
commitd65d04fabb5bc2336d24a44e15fd592a22be4ca7 (patch)
treecccc3321fc38ce6e971de421b1ae12ec18844b9a
parent29855943870576e4e3048ae5ac1103f29b9c2bf6 (diff)
downloadttrace-d65d04fabb5bc2336d24a44e15fd592a22be4ca7.tar.gz
ttrace-d65d04fabb5bc2336d24a44e15fd592a22be4ca7.tar.bz2
ttrace-d65d04fabb5bc2336d24a44e15fd592a22be4ca7.zip
Fix an incorrect declaration to free the array unique_ptr. Change-Id: I863708576482584156cd37f8e21aa824bdc7abb7
-rwxr-xr-xsrc/atrace/atrace.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/atrace/atrace.cpp b/src/atrace/atrace.cpp
index eea8d9b..bb2edf2 100755
--- a/src/atrace/atrace.cpp
+++ b/src/atrace/atrace.cpp
@@ -723,8 +723,8 @@ static void dumpTrace(bool startup)
}
const size_t bufSize = 64*1024;
- std::unique_ptr<uint8_t> in(new uint8_t[bufSize]);
- std::unique_ptr<uint8_t> out(new uint8_t[bufSize]);
+ std::unique_ptr<uint8_t[]> in(new uint8_t[bufSize]);
+ std::unique_ptr<uint8_t[]> out(new uint8_t[bufSize]);
if ((in == nullptr) || (out == nullptr)) {
fprintf(stderr, "Could not allocate memory");
close(traceFD);