Commit 86ef7b3
committed
wallet: Avoid null pointer deref when cleaning up migratewallet
If migratewallet fails, we do a cleanup which removes the watchonly and
solvables wallets if they were created. However, if they were not, their
pointers are nullptr and we don't check for that, which causes a
segfault during the cleanup. So check that they aren't nullptr before
cleaning them up.1 parent 9f65006 commit 86ef7b3
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4093 | 4093 | | |
4094 | 4094 | | |
4095 | 4095 | | |
4096 | | - | |
4097 | | - | |
| 4096 | + | |
| 4097 | + | |
4098 | 4098 | | |
4099 | 4099 | | |
4100 | 4100 | | |
| |||
0 commit comments