mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
peer_control: move link to the top of the structure.
memleak doesn't detect pointers to within an object, only pointers to their exact address (it's simpler this way). Moving the linked list to the top of the structure means it can follow the chain. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
20fcb5d6ef
commit
cec87ba08b
@ -18,6 +18,10 @@
|
||||
struct crypto_state;
|
||||
|
||||
struct peer {
|
||||
/* Inside ld->peers. */
|
||||
struct list_node list;
|
||||
|
||||
/* Master context */
|
||||
struct lightningd *ld;
|
||||
|
||||
/* Database ID of the peer */
|
||||
@ -41,9 +45,6 @@ struct peer {
|
||||
/* Command which ordered us to open channel, if any. */
|
||||
struct command *opening_cmd;
|
||||
|
||||
/* Inside ld->peers. */
|
||||
struct list_node list;
|
||||
|
||||
/* Is there a single subdaemon responsible for us? */
|
||||
struct subd *owner;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user