From d5064ff56c54cb1bb6c0ccdcfd82873b9bb7b670 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 26 Feb 2022 11:20:34 +1030 Subject: [PATCH] libplugin: make memleak see current requests. Signed-off-by: Rusty Russell --- plugins/libplugin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/libplugin.c b/plugins/libplugin.c index b44114618..942c91822 100644 --- a/plugins/libplugin.c +++ b/plugins/libplugin.c @@ -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);