lightningd: clean up tmpctx on exit before freeing ld.

Fixes: #1866
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-08-29 09:38:10 +09:30 committed by Christian Decker
parent 7e1fd9c38a
commit 94da5c9bd4

View file

@ -475,6 +475,9 @@ int main(int argc, char *argv[])
close(pid_fd); close(pid_fd);
remove(ld->pidfile); remove(ld->pidfile);
/* FIXME: pay can have children off tmpctx which unlink from
* ld->payments, so clean that up. */
clean_tmpctx();
tal_free(ld); tal_free(ld);
opt_free_table(); opt_free_table();