From 2ca2059f6694387591488256fbec4826e5316570 Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Mon, 27 Feb 2017 17:22:50 -0800 Subject: [PATCH] Get unique_ptr to use delete[] for char[] in DumpMallocStats Summary: Avoid mismatched free() / delete / delete [] in DumpMallocStats Closes https://github.com/facebook/rocksdb/pull/1927 Differential Revision: D4622045 Pulled By: siying fbshipit-source-id: 1131b30 --- db/db_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 88b1684be..b87f0863d 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -604,7 +604,7 @@ static void DumpMallocStats(std::string* stats) { #ifdef ROCKSDB_JEMALLOC MallocStatus mstat; const uint kMallocStatusLen = 1000000; - std::unique_ptr buf{new char[kMallocStatusLen + 1]}; + std::unique_ptr buf{new char[kMallocStatusLen + 1]}; mstat.cur = buf.get(); mstat.end = buf.get() + kMallocStatusLen; malloc_stats_print(GetJemallocStatus, &mstat, "");