mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
wallet.c: Minor leak in wallet_invoices_load.
This commit is contained in:
parent
44c37b60e4
commit
4022fc0034
@ -1105,6 +1105,8 @@ bool wallet_invoices_load(struct wallet *wallet, struct invoices *invs)
|
||||
i = tal(invs, struct invoice);
|
||||
if (!wallet_stmt2invoice(stmt, i)) {
|
||||
log_broken(wallet->log, "Error deserializing invoice");
|
||||
tal_free(i);
|
||||
sqlite3_finalize(stmt);
|
||||
return false;
|
||||
}
|
||||
invoice_add(invs, i);
|
||||
@ -1112,6 +1114,7 @@ bool wallet_invoices_load(struct wallet *wallet, struct invoices *invs)
|
||||
}
|
||||
|
||||
log_debug(wallet->log, "Loaded %d invoices from DB", count);
|
||||
sqlite3_finalize(stmt);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user