Avoid potential NULL pointer dereference in wallet_payment_store(...)

This commit is contained in:
practicalswift 2018-01-18 07:23:15 +01:00 committed by Christian Decker
parent a06f0dfeb1
commit 5697332677

View file

@ -1275,6 +1275,7 @@ void wallet_payment_store(struct wallet *wallet,
struct wallet_payment *payment;
payment = find_unstored_payment(wallet, payment_hash);
assert(payment);
/* Don't attempt to add the same payment twice */
assert(!payment->id);