Skip to content

Commit 973f891

Browse files
committed
free the previous their_features
1 parent 1bd322f commit 973f891

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightningd/peer_control.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,8 +1403,10 @@ void peer_connected(struct lightningd *ld, const u8 *msg)
14031403
if (!peer)
14041404
peer = new_peer(ld, 0, &id, &hook_payload->addr,
14051405
their_features, hook_payload->incoming);
1406-
else
1406+
else {
1407+
tal_free(peer->their_features);
14071408
peer->their_features = tal_dup_talarr(peer, u8, their_features);
1409+
}
14081410

14091411
/* We track this, because messages can race between connectd and us.
14101412
* For example, we could tell it to attach a subd, but it's actually

0 commit comments

Comments
 (0)