Merge pull request #38385 from rzarzynski/wip-rbd-memset_s

librbd: use the ceph_memzero_s() wrapper instead of explicit_bzero()

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2020-12-02 15:38:15 -05:00 committed by GitHub
commit 871404a709
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ void FormatRequest<I>::handle_write_header(int r) {
template <typename I>
void FormatRequest<I>::finish(int r) {
explicit_bzero(&m_passphrase[0], m_passphrase.size());
ceph_memzero_s(&m_passphrase[0], m_passphrase.capacity(), m_passphrase.size());
m_on_finish->complete(r);
delete this;
}