From af95aecd01b2b0e19c8affb2a2594ac7a846f285 Mon Sep 17 00:00:00 2001 From: Zhongyi Xie Date: Sun, 15 Apr 2018 23:44:08 -0700 Subject: [PATCH] use delete[] to dealloc an array Summary: fix a bug in `db_stress` where an int array was incorrectly deallocated using delete instead of delete[] Closes https://github.com/facebook/rocksdb/pull/3725 Differential Revision: D7634749 Pulled By: miasantreble fbshipit-source-id: 489b776f5f4c03de1824edac5495787ec19cc910 --- tools/db_stress.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/db_stress.cc b/tools/db_stress.cc index 26d921aab..2df610104 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -818,7 +818,7 @@ class SharedState { } assert(cf_ids.size() == static_cast(num_no_overwrite_keys)); } - delete permutation; + delete[] permutation; if (FLAGS_test_batches_snapshots) { fprintf(stdout, "No lock creation because test_batches_snapshots set\n");