diff --git a/common/daemon.c b/common/daemon.c index c14de8b07..c3adac2a0 100644 --- a/common/daemon.c +++ b/common/daemon.c @@ -222,8 +222,11 @@ bool daemon_developer_mode(char *argv[]) kill(getpid(), SIGSTOP); } - /* This checks for any tal_steal loops! */ - add_steal_notifiers(NULL); + /* This checks for any tal_steal loops, but it's not free: + * only use if we're already using the fairly heavy memleak + * detection. */ + if (getenv("LIGHTNINGD_DEV_MEMLEAK")) + add_steal_notifiers(NULL); return true; }