| 2094 | } |
| 2095 | |
| 2096 | static bool handle_dev_memleak(struct tracked_output **outs, const u8 *msg) |
| 2097 | { |
| 2098 | struct htable *memtable; |
| 2099 | bool found_leak; |
| 2100 | |
| 2101 | if (!fromwire_onchaind_dev_memleak(msg)) |
| 2102 | return false; |
| 2103 | |
| 2104 | memtable = memleak_start(tmpctx); |
| 2105 | memleak_ptr(memtable, msg); |
| 2106 | |
| 2107 | /* Top-level context is parent of outs */ |
| 2108 | memleak_remove_globals(memtable, tal_parent(outs)); |
| 2109 | memleak_scan_obj(memtable, outs); |
| 2110 | |
| 2111 | found_leak = dump_memleak(memtable, memleak_status_broken); |
| 2112 | wire_sync_write(REQ_FD, |
| 2113 | take(towire_onchaind_dev_memleak_reply(NULL, |
| 2114 | found_leak))); |
| 2115 | return true; |
| 2116 | } |
| 2117 | #else |
| 2118 | static bool handle_dev_memleak(struct tracked_output **outs, const u8 *msg) |
| 2119 | { |
no test coverage detected