From 94da5c9bd4f7d1eee3ebadd9121333e1e00647d7 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 29 Aug 2018 09:38:10 +0930 Subject: [PATCH] lightningd: clean up tmpctx on exit before freeing ld. Fixes: #1866 Signed-off-by: Rusty Russell --- lightningd/lightningd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index 0c5552ece..abac82e0a 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -475,6 +475,9 @@ int main(int argc, char *argv[]) close(pid_fd); remove(ld->pidfile); + /* FIXME: pay can have children off tmpctx which unlink from + * ld->payments, so clean that up. */ + clean_tmpctx(); tal_free(ld); opt_free_table();