From a409cc26d9340efa9c432c14c44a52bbb41360e3 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 2 Aug 2018 16:19:55 +0930 Subject: [PATCH] memleak: reenable CCAN_TAL_DEBUG in DEVELOPER mode. It no longer has any effect on tal_len(), but it *does* give file and line of allocations which is much nicer for tracking memory leaks! Signed-off-by: Rusty Russell --- Makefile | 2 +- common/memleak.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6dd52be24..729ada678 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ VG_TEST_ARGS = --track-origins=yes --leak-check=full --show-reachable=yes --erro endif ifeq ($(DEVELOPER),1) -DEV_CFLAGS=-DCCAN_TAKE_DEBUG=1 +DEV_CFLAGS=-DCCAN_TAKE_DEBUG=1 -DCCAN_TAL_DEBUG=1 else DEV_CFLAGS= endif diff --git a/common/memleak.c b/common/memleak.c index f7a37a4e2..e7d6905b3 100644 --- a/common/memleak.c +++ b/common/memleak.c @@ -91,7 +91,7 @@ static void children_into_htable(const void *exclude1, const void *exclude2, continue; /* ccan/io allocates pollfd array. */ - if (streq(name, "struct pollfd[]") && !tal_parent(i)) + if (strends(name, "struct pollfd[]") && !tal_parent(i)) continue; /* Don't add tmpctx. */