| 100 | } |
| 101 | |
| 102 | static bool lightningd_check_leaks(struct command *cmd) |
| 103 | { |
| 104 | struct lightningd *ld = cmd->ld; |
| 105 | struct htable *memtable; |
| 106 | |
| 107 | /* Enter everything, except this cmd and its jcon */ |
| 108 | memtable = memleak_start(cmd); |
| 109 | |
| 110 | /* This command is not a leak! */ |
| 111 | memleak_ptr(memtable, cmd); |
| 112 | memleak_ignore_children(memtable, cmd); |
| 113 | |
| 114 | /* Now delete ld and those which it has pointers to. */ |
| 115 | memleak_scan_obj(memtable, ld); |
| 116 | |
| 117 | return dump_memleak(memtable, memleak_log, ld->log); |
| 118 | } |
| 119 | |
| 120 | static void finish_report(struct leak_detect *leaks) |
| 121 | { |
no test coverage detected