]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix wrong delete type in DataCryptor
authorOr Ozeri <oro@il.ibm.com>
Mon, 11 Jan 2021 11:45:00 +0000 (13:45 +0200)
committerOr Ozeri <oro@il.ibm.com>
Mon, 11 Jan 2021 11:51:16 +0000 (13:51 +0200)
This commit fixes a delete which does not match its allocation

Signed-off-by: Or Ozeri <oro@il.ibm.com>
src/librbd/crypto/openssl/DataCryptor.cc

index 0ed1d84ed3b9fb1cc55c558041dc8fb395d3033b..6d2ce0ff732986e6967affd6f961c658c451cf95 100644 (file)
@@ -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;
   }
 }