| 4097 | } |
| 4098 | |
| 4099 | void peer_dev_memleak(struct lightningd *ld, struct leak_detect *leaks) |
| 4100 | { |
| 4101 | struct peer *p; |
| 4102 | struct peer_node_id_map_iter it; |
| 4103 | |
| 4104 | for (p = peer_node_id_map_first(ld->peers, &it); |
| 4105 | p; |
| 4106 | p = peer_node_id_map_next(ld->peers, &it)) { |
| 4107 | struct channel *c; |
| 4108 | if (p->uncommitted_channel && p->uncommitted_channel->open_daemon) { |
| 4109 | struct subd *openingd = p->uncommitted_channel->open_daemon; |
| 4110 | start_leak_request(subd_req(openingd, openingd, |
| 4111 | take(towire_openingd_dev_memleak(NULL)), |
| 4112 | -1, 0, openingd_memleak_req_done, leaks), |
| 4113 | leaks); |
| 4114 | } |
| 4115 | |
| 4116 | list_for_each(&p->channels, c, list) { |
| 4117 | if (!c->owner) |
| 4118 | continue; |
| 4119 | if (streq(c->owner->name, "channeld")) { |
| 4120 | start_leak_request(subd_req(c, c->owner, |
| 4121 | take(towire_channeld_dev_memleak(NULL)), |
| 4122 | -1, 0, channeld_memleak_req_done, leaks), |
| 4123 | leaks); |
| 4124 | } else if (streq(c->owner->name, "onchaind")) { |
| 4125 | start_leak_request(subd_req(c, c->owner, |
| 4126 | take(towire_onchaind_dev_memleak(NULL)), |
| 4127 | -1, 0, onchaind_memleak_req_done, leaks), |
| 4128 | leaks); |
| 4129 | } else if (streq(c->owner->name, "dualopend")) { |
| 4130 | start_leak_request(subd_req(c, c->owner, |
| 4131 | take(towire_dualopend_dev_memleak(NULL)), |
| 4132 | -1, 0, dualopend_memleak_req_done, leaks), |
| 4133 | leaks); |
| 4134 | } |
| 4135 | } |
| 4136 | } |
| 4137 | } |
no test coverage detected