Skip to content

Commit 87d1add

Browse files
committed
fix delete[] in topk.cc
1 parent eb79670 commit 87d1add

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/types/topk.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void BlockSplitTopK::Add(const std::string &item, uint32_t increment) {
223223
if (heap[0].count == max_count || heap[0].count + 1 == max_count) {
224224
heap[0].fp = fp;
225225
heap[0].itemlen = itemlen;
226-
delete heap[0].item;
226+
delete[] heap[0].item;
227227
heap[0].item = new char[itemlen];
228228
memcpy(heap[0].item, data, itemlen);
229229

0 commit comments

Comments
 (0)