Fix wallet memory leaks in cases of unsuccessful CreateWalletFromFile calls.
[wallet] Fix wallet memory leaks in cases of unsuccessful CreateWalletFromFile calls #10895
pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:wallet-memory-leaks changing 1 files +10 −0-
practicalswift commented at 4:33 PM on July 21, 2017: contributor
-
[wallet] Fix wallet memory leaks e2d84e5cbb
-
bpay commented at 6:24 PM on July 21, 2017: contributor
This sort of thing should be handled by unique_ptr or some other form of RAII.
-
jonasschnelli commented at 6:27 PM on July 21, 2017: contributor
Agree with @bpay: Should use a unique_ptr for
CWallet *tempWallet = new CWallet(std::move(dbw));(same way like the line above:std::unique_ptr<CWalletDBWrapper> dbw(new CWalletDBWrapper(&bitdb, walletFile));) - jonasschnelli added the label Refactoring on Jul 21, 2017
- practicalswift closed this on Jul 21, 2017
- practicalswift deleted the branch on Apr 10, 2021
- DrahtBot locked this on Aug 16, 2022
Contributors
Labels