Skip to content

Commit

Permalink
librbd: fix wrong delete type in DataCryptor
Browse files Browse the repository at this point in the history
This commit fixes a delete which does not match its allocation

Signed-off-by: Or Ozeri <[email protected]>
  • Loading branch information
orozery committed Jan 11, 2021
1 parent 285ba2a commit 05995ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librbd/crypto/openssl/DataCryptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 05995ef

Please sign in to comment.