From: Or Ozeri Date: Mon, 11 Jan 2021 11:45:00 +0000 (+0200) Subject: librbd: fix wrong delete type in DataCryptor X-Git-Tag: v16.1.0~87^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05995ef56fab9a44b05a3121202bb8d9846dae89;p=ceph.git librbd: fix wrong delete type in DataCryptor This commit fixes a delete which does not match its allocation Signed-off-by: Or Ozeri --- diff --git a/src/librbd/crypto/openssl/DataCryptor.cc b/src/librbd/crypto/openssl/DataCryptor.cc index 0ed1d84ed3b9..6d2ce0ff7329 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; } }