From 7c512f91ce8176c046a1acdaffd385024a2eab5b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 18 Feb 2018 23:27:46 +1030 Subject: [PATCH] memleak: ignore tal_link artifacts. We use strends, because that works with or without CCAN_TAL_DEBUG (which prepends file and line). Signed-off-by: Rusty Russell --- common/memleak.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/memleak.c b/common/memleak.c index a0bfb1160..cbfa8d1b5 100644 --- a/common/memleak.c +++ b/common/memleak.c @@ -91,6 +91,11 @@ static void children_into_htable(const void *exclude1, const void *exclude2, if (streq(name, "backtrace")) continue; + /* Don't add tal_link objects */ + if (strends(name, "struct link") + || strends(name, "struct linkable")) + continue; + /* ccan/io allocates pollfd array. */ if (streq(name, "ccan/ccan/io/poll.c:40:struct pollfd[]"))