| 548 | |
| 549 | #if DEVELOPER |
| 550 | static struct io_plan *handle_memleak(struct io_conn *conn, |
| 551 | struct client *c, |
| 552 | const u8 *msg_in) |
| 553 | { |
| 554 | struct htable *memtable; |
| 555 | bool found_leak; |
| 556 | u8 *reply; |
| 557 | |
| 558 | memtable = memleak_start(tmpctx); |
| 559 | memleak_ptr(memtable, msg_in); |
| 560 | |
| 561 | /* Now note clients and anything they point to. */ |
| 562 | memleak_scan_region(memtable, dbid_zero_clients, sizeof(dbid_zero_clients)); |
| 563 | memleak_scan_uintmap(memtable, &clients); |
| 564 | memleak_scan_obj(memtable, status_conn); |
| 565 | |
| 566 | memleak_ptr(memtable, dev_force_privkey); |
| 567 | memleak_ptr(memtable, dev_force_bip32_seed); |
| 568 | |
| 569 | found_leak = dump_memleak(memtable, memleak_status_broken); |
| 570 | reply = towire_hsmd_dev_memleak_reply(NULL, found_leak); |
| 571 | return req_reply(conn, c, take(reply)); |
| 572 | } |
| 573 | #endif /* DEVELOPER */ |
| 574 | |
| 575 | u8 *hsmd_status_bad_request(struct hsmd_client *client, const u8 *msg, const char *error) |
no test coverage detected