libplugin: make memleak see current requests.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-02-26 11:20:34 +10:30
parent 9bf2aa65cd
commit d5064ff56c

View File

@ -1195,6 +1195,9 @@ static void memleak_check(struct plugin *plugin, struct command *cmd)
/* Now delete plugin and anything it has pointers to. */
memleak_remove_region(memtable, plugin, sizeof(*plugin));
/* Memleak needs some help to see into intmaps */
memleak_remove_uintmap(memtable, &plugin->out_reqs);
/* We know usage strings are referred to. */
memleak_remove_strmap(memtable, &cmd->plugin->usagemap);