Fix SVACE issue 70/233670/1 accepted/tizen/unified/20200528.133036 submit/tizen/20200519.012936
authorsattdeepan.d <sattdeepan.d@samsung.com>
Fri, 15 May 2020 05:58:03 +0000 (11:28 +0530)
committerSeungha Son <seungha.son@samsung.com>
Mon, 18 May 2020 06:42:30 +0000 (15:42 +0900)
 Fix an incorrect declaration to free the array unique_ptr.

Change-Id: I863708576482584156cd37f8e21aa824bdc7abb7

src/atrace/atrace.cpp

index eea8d9b974a28894f28f88f5d9129de87d2144bb..bb2edf265b5ecc0d6fc215b4df28c89de14750d8 100755 (executable)
@@ -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);