mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 14:54:26 +01:00
lightningd: add notleak annotations.
We have things which we don't keep a pointer to, but aren't leaks. Some are simply eternal (eg. listening sockets), others cases are io_conn tied to the lifetime of an fd, and timers which expire. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
6c951bf7e0
commit
ccb7047291
@@ -16,6 +16,7 @@
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
#include <common/json.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/utils.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
@@ -176,7 +177,8 @@ static void next_bcli(struct bitcoind *bitcoind)
|
||||
fatal("%s exec failed: %s", bcli->args[0], strerror(errno));
|
||||
|
||||
bitcoind->req_running = true;
|
||||
conn = io_new_conn(bitcoind, bcli->fd, output_init, bcli);
|
||||
/* This lifetime is attached to bitcoind command fd */
|
||||
conn = notleak(io_new_conn(bitcoind, bcli->fd, output_init, bcli));
|
||||
io_set_finish(conn, bcli_finished, bcli);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user