| 4377 | } |
| 4378 | |
| 4379 | void peer_dev_memleak(struct lightningd *ld, struct leak_detect *leaks) |
| 4380 | { |
| 4381 | struct peer *p; |
| 4382 | struct peer_node_id_map_iter it; |
| 4383 | |
| 4384 | for (p = peer_node_id_map_first(ld->peers, &it); |
| 4385 | p; |
| 4386 | p = peer_node_id_map_next(ld->peers, &it)) { |
| 4387 | struct channel *c; |
| 4388 | if (p->uncommitted_channel && p->uncommitted_channel->open_daemon) { |
| 4389 | struct subd *openingd = p->uncommitted_channel->open_daemon; |
| 4390 | start_leak_request(subd_req(openingd, openingd, |
| 4391 | take(towire_openingd_dev_memleak(NULL)), |
| 4392 | -1, 0, openingd_memleak_req_done, leaks), |
| 4393 | leaks); |
| 4394 | } |
| 4395 | |
| 4396 | list_for_each(&p->channels, c, list) { |
| 4397 | if (!c->owner) |
| 4398 | continue; |
| 4399 | if (streq(c->owner->name, "channeld")) { |
| 4400 | start_leak_request(subd_req(c, c->owner, |
| 4401 | take(towire_channeld_dev_memleak(NULL)), |
| 4402 | -1, 0, channeld_memleak_req_done, leaks), |
| 4403 | leaks); |
| 4404 | } else if (streq(c->owner->name, "onchaind")) { |
| 4405 | start_leak_request(subd_req(c, c->owner, |
| 4406 | take(towire_onchaind_dev_memleak(NULL)), |
| 4407 | -1, 0, onchaind_memleak_req_done, leaks), |
| 4408 | leaks); |
| 4409 | } else if (streq(c->owner->name, "dualopend")) { |
| 4410 | start_leak_request(subd_req(c, c->owner, |
| 4411 | take(towire_dualopend_dev_memleak(NULL)), |
| 4412 | -1, 0, dualopend_memleak_req_done, leaks), |
| 4413 | leaks); |
| 4414 | } |
| 4415 | } |
| 4416 | } |
| 4417 | } |
no test coverage detected