HomePhabricator

[backport#14138] wallet: Set encrypted_batch to nullptr after delete. Avoid…

Description

[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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Sep 10 2018, 15:58
majcostaCommitted on Jul 24 2020, 13:37
majcostaPushed on Jul 24 2020, 13:37
Reviewer
Restricted Project
Differential Revision
D7027: [backport#14138] wallet: Set encrypted_batch to nullptr after delete. Avoid double free in the case of NDEBUG.
Parents
rABC41089c35ccd8: [backport#13657] wallet: assert to ensure accuracy of CMerkleTx…
Branches
Unknown
Tags
Unknown