mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
db: fix leak for initial commit state.
It's only a single cstate, but it need not outlive the commit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
b40c4ae766
commit
d14a67addf
1 changed files with 2 additions and 2 deletions
|
@ -506,13 +506,13 @@ static void load_peer_htlcs(struct peer *peer)
|
|||
fatal("load_peer_htlcs:prepare gave %s:%s",
|
||||
sqlite3_errstr(err), sqlite3_errmsg(sql));
|
||||
|
||||
peer->local.commit->cstate = initial_cstate(peer,
|
||||
peer->local.commit->cstate = initial_cstate(peer->local.commit,
|
||||
peer->anchor.satoshis,
|
||||
peer->local.commit_fee_rate,
|
||||
peer->local.offer_anchor
|
||||
== CMD_OPEN_WITH_ANCHOR ?
|
||||
LOCAL : REMOTE);
|
||||
peer->remote.commit->cstate = initial_cstate(peer,
|
||||
peer->remote.commit->cstate = initial_cstate(peer->remote.commit,
|
||||
peer->anchor.satoshis,
|
||||
peer->remote.commit_fee_rate,
|
||||
peer->local.offer_anchor
|
||||
|
|
Loading…
Add table
Reference in a new issue