mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-10 17:44:22 +01:00
hsmd: Fix a memory leak in status.c
This commit is contained in:
committed by
Christian Decker
parent
c737fa6b91
commit
c5f4c9cefb
@@ -61,12 +61,19 @@ void status_setup_sync(int fd)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void destroy_daemon_conn(struct daemon_conn *dc UNUSED)
|
||||
{
|
||||
status_conn = NULL;
|
||||
}
|
||||
|
||||
void status_setup_async(struct daemon_conn *master)
|
||||
{
|
||||
assert(status_fd == -1);
|
||||
assert(!status_conn);
|
||||
status_conn = master;
|
||||
|
||||
tal_add_destructor(master, destroy_daemon_conn);
|
||||
|
||||
setup_logging_sighandler();
|
||||
#if DEVELOPER
|
||||
logging_io = (getenv("LIGHTNINGD_DEV_LOG_IO") != NULL);
|
||||
|
||||
Reference in New Issue
Block a user