[backport#14138] wallet: Set encrypted_batch to nullptr after delete. Avoid double free in the case of NDEBUG.
Summary:
fa462b365715928d2c6eb52ca6a448f367084f0f wallet: Set encrypted_batch to nullptr after delete. Avoid double free in the case of NDEBUG. (practicalswift)
Pull request description:
Set `encrypted_batch` to `nullptr` after delete. Avoid double free in the case of `NDEBUG`.
https://github.com/bitcoin/bitcoin/pull/14138/commits/fa462b365715928d2c6eb52ca6a448f367084f0f
Backport of Core PR14138
Test Plan:
ninja check check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7027