lightningd: fix leak report from peer_connected.

`their_features` is allocated off the hook_payload.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-02-02 14:25:10 +10:30 committed by Alex Myers
parent 35d02a784b
commit d6b553cfa0
1 changed files with 1 additions and 1 deletions

View File

@ -1424,7 +1424,7 @@ void peer_connected(struct lightningd *ld, const u8 *msg)
if (peer->remote_addr)
tal_free(peer->remote_addr);
peer->remote_addr = NULL;
peer_update_features(peer, their_features);
peer_update_features(peer, take(their_features));
tal_steal(peer, hook_payload);
hook_payload->peer = peer;