mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-09 17:14:28 +01:00
gossipd: fix memleak.
Not really a leak, since we eventually process pending, but still:
```
**BROKEN** gossipd: MEMLEAK: 0x5562fa63bab8
**BROKEN** gossipd: label=wire/peer_exp_wiregen.c:3858:u8[]
DEBUG gossipd: backtrace:
DEBUG gossipd: ccan/ccan/tal/tal.c:442 (tal_alloc_)
DEBUG gossipd: ccan/ccan/tal/tal.c:471 (tal_alloc_arr_)
DEBUG gossipd: wire/peer_exp_wiregen.c:3858 (fromwire_channel_announcement)
DEBUG gossipd: gossipd/routing.c:1706 (handle_channel_announcement)
DEBUG gossipd: gossipd/gossipd.c:238 (handle_channel_announcement_msg)
DEBUG gossipd: gossipd/gossipd.c:444 (peer_msg_in)
DEBUG gossipd: common/daemon_conn.c:31 (handle_read)
DEBUG gossipd: ccan/ccan/io/io.c:59 (next_plan)
DEBUG gossipd: ccan/ccan/io/io.c:407 (do_plan)
DEBUG gossipd: ccan/ccan/io/io.c:417 (io_ready)
DEBUG gossipd: ccan/ccan/io/poll.c:445 (io_loop)
DEBUG gossipd: gossipd/gossipd.c:1730 (main)
**BROKEN** gossipd: parents:
**BROKEN** gossipd: gossipd/routing.c:1698:struct pending_cannouncement
**BROKEN** gossipd: gossipd/gossipd.c:1700:struct daemon
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1721,6 +1721,9 @@ u8 *handle_channel_announcement(struct routing_state *rstate,
|
||||
goto malformed;
|
||||
}
|
||||
|
||||
/* We don't use features */
|
||||
tal_free(features);
|
||||
|
||||
/* If we know the blockheight, and it's in the future, reject
|
||||
* out-of-hand. Remember, it should be 6 deep before they tell us
|
||||
* anyway. */
|
||||
|
||||
Reference in New Issue
Block a user