From 05995ef56fab9a44b05a3121202bb8d9846dae89 Mon Sep 17 00:00:00 2001 From: Or Ozeri Date: Mon, 11 Jan 2021 13:45:00 +0200 Subject: [PATCH] librbd: fix wrong delete type in DataCryptor This commit fixes a delete which does not match its allocation Signed-off-by: Or Ozeri --- src/librbd/crypto/openssl/DataCryptor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librbd/crypto/openssl/DataCryptor.cc b/src/librbd/crypto/openssl/DataCryptor.cc index 0ed1d84ed3b9f..6d2ce0ff73298 100644 --- a/src/librbd/crypto/openssl/DataCryptor.cc +++ b/src/librbd/crypto/openssl/DataCryptor.cc @@ -49,7 +49,7 @@ DataCryptor::~DataCryptor() { if (m_key != nullptr) { ceph_memzero_s(m_key, EVP_CIPHER_key_length(m_cipher), EVP_CIPHER_key_length(m_cipher)); - delete m_key; + delete [] m_key; m_key = nullptr; } } -- 2.39.5