diff options
author | David Zafman <david.zafman@inktank.com> | 2013-07-30 18:41:14 -0700 |
---|---|---|
committer | David Zafman <david.zafman@inktank.com> | 2013-07-31 12:04:23 -0700 |
commit | 5bd061c03972adcd18c74f329fde64b8947edc0d (patch) | |
tree | 82ec0a9f139b405ec90ab5e0fb019a9ea9b5e81d | |
parent | c48644d811117b7cd44ce2312f53e1cb82c7996a (diff) | |
download | ceph-5bd061c03972adcd18c74f329fde64b8947edc0d.tar.gz |
test: Fix valgrind found "Mismatched free() / delete / delete []"
Use delete[] in set_argv() so that valgrind runs clean
Signed-off-by: David Zafman <david.zafman@inktank.com>
-rw-r--r-- | src/test/system/systest_runnable.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/system/systest_runnable.cc b/src/test/system/systest_runnable.cc index c0bc977618f..ec9b823db14 100644 --- a/src/test/system/systest_runnable.cc +++ b/src/test/system/systest_runnable.cc @@ -229,9 +229,9 @@ set_argv(int argc, const char **argv) if (m_argv_orig != NULL) { for (int i = 0; i < m_argc; ++i) free((void*)(m_argv_orig[i])); - delete m_argv_orig; + delete[] m_argv_orig; m_argv_orig = NULL; - delete m_argv; + delete[] m_argv; m_argv = NULL; m_argc = 0; } |