mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
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:
committed by
Alex Myers
parent
35d02a784b
commit
d6b553cfa0
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user