wallet: Fix potential memory leak when loading a corrupted wallet file #11007
pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:wallet-corrupted-leak changing 1 files +1 −4-
practicalswift commented at 3:39 pm on August 8, 2017: contributorFix potential memory leak when loading a corrupted wallet file.
-
practicalswift renamed this:
[qt] Fix memory leak when loading a corrupted wallet file
[wallet] Fix memory leak when loading a corrupted wallet file
on Aug 8, 2017 -
practicalswift force-pushed on Aug 8, 2017
-
practicalswift renamed this:
[wallet] Fix memory leak when loading a corrupted wallet file
wallet: Fix memory leak when loading a corrupted wallet file
on Aug 8, 2017 -
in src/wallet/wallet.cpp:3940 in 5e4e5c89e3 outdated
3885@@ -3886,15 +3886,12 @@ CWallet* CWallet::CreateWalletFromFile(const std::string walletFile) 3886 uiInterface.InitMessage(_("Zapping all transactions from wallet...")); 3887 3888 std::unique_ptr<CWalletDBWrapper> dbw(new CWalletDBWrapper(&bitdb, walletFile)); 3889- CWallet *tempWallet = new CWallet(std::move(dbw)); 3890+ std::unique_ptr<CWallet> tempWallet(new CWallet(std::move(dbw)));
eklitzke commented at 9:35 pm on August 8, 2017:nit: If you move the previous line into this one, you can omit thestd::move
operation.
jonasschnelli commented at 7:26 pm on August 15, 2017:I think @eklitzke is right here that it would be good to avoid that std::move.
promag commented at 7:31 am on August 22, 2017:Too long?fanquake added the label Wallet on Aug 8, 2017gmaxwell commented at 0:21 am on August 9, 2017: contributorPlease avoid titling PR’s with things like “Fix memory leak” for things where there isn’t an actual leak in practice. (e.g. because it exits). Changes like this are good but they mess up people trying to figure out if an issue they are encounter has been fixed (“I have a memory leak, oh they just fixed one. They’s probably it.”), or when slowing things down when looking for other issues.gmaxwell approvedgmaxwell commented at 0:23 am on August 9, 2017: contributorutACKpracticalswift renamed this:
wallet: Fix memory leak when loading a corrupted wallet file
wallet: Fix potential memory leak when loading a corrupted wallet file
on Aug 9, 2017practicalswift commented at 4:54 am on August 9, 2017: contributor@gmaxwell That’s a good point! I’ve now changed to “Fix potential memory leak” - works or still room for improvement? :-)practicalswift force-pushed on Aug 9, 2017MarcoFalke commented at 8:57 am on August 10, 2017: memberutACK c8b4b80df8346739c9a52113fd6673db1574e1f3wallet: Fix memory leak when loading a corrupted wallet file c06755f5cfpracticalswift force-pushed on Aug 14, 2017practicalswift commented at 3:55 pm on August 14, 2017: contributorRebased!laanwj merged this on Aug 22, 2017laanwj closed this on Aug 22, 2017
laanwj referenced this in commit fc5c237d4a on Aug 22, 2017PastaPastaPasta referenced this in commit 26d9c48749 on Sep 19, 2019PastaPastaPasta referenced this in commit 72dcf30b5b on Sep 23, 2019PastaPastaPasta referenced this in commit 6c1424b6fc on Sep 24, 2019PastaPastaPasta referenced this in commit b9b6890dba on Nov 19, 2019PastaPastaPasta referenced this in commit f7f00a3ef8 on Nov 21, 2019PastaPastaPasta referenced this in commit 8d3a0fac21 on Dec 9, 2019PastaPastaPasta referenced this in commit dba9ffefe5 on Jan 1, 2020PastaPastaPasta referenced this in commit 483b545fc4 on Jan 2, 2020PastaPastaPasta referenced this in commit 1273fc2795 on Jan 2, 2020ckti referenced this in commit b05237617d on Mar 28, 2021practicalswift deleted the branch on Apr 10, 2021gades referenced this in commit adaf233247 on Jun 25, 2021gades referenced this in commit 44add6b430 on Feb 5, 2022DrahtBot locked this on Aug 18, 2022
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 18:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 18:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me