| 884 | */ |
| 885 | #if DEVELOPER |
| 886 | static void handle_dev_memleak(struct state *state, const u8 *msg) |
| 887 | { |
| 888 | struct htable *memtable; |
| 889 | bool found_leak; |
| 890 | |
| 891 | /* Populate a hash table with all our allocations (except msg, which |
| 892 | * is in use right now). */ |
| 893 | memtable = memleak_start(tmpctx); |
| 894 | memleak_ptr(memtable, msg); |
| 895 | |
| 896 | /* Now delete state and things it has pointers to. */ |
| 897 | memleak_scan_obj(memtable, state); |
| 898 | |
| 899 | /* If there's anything left, dump it to logs, and return true. */ |
| 900 | found_leak = dump_memleak(memtable, memleak_status_broken); |
| 901 | wire_sync_write(REQ_FD, |
| 902 | take(towire_dualopend_dev_memleak_reply(NULL, |
| 903 | found_leak))); |
| 904 | } |
| 905 | #endif /* DEVELOPER */ |
| 906 | |
| 907 | static u8 *psbt_to_tx_sigs_msg(const tal_t *ctx, |
no test coverage detected