From 86e49e02739f6ecd42a18778e3be07370bb0d286 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 24 Nov 2021 14:36:05 +1030 Subject: [PATCH] lightningd: remove some unnneded notleak(). We now reach into the uintmap, so this is unnecesary. Signed-off-by: Rusty Russell --- lightningd/bitcoind.c | 3 +-- lightningd/channel_control.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lightningd/bitcoind.c b/lightningd/bitcoind.c index 2a6e41689..ba6bf9d63 100644 --- a/lightningd/bitcoind.c +++ b/lightningd/bitcoind.c @@ -405,8 +405,7 @@ void bitcoind_getrawblockbyheight_(struct bitcoind *bitcoind, req = jsonrpc_request_start(bitcoind, "getrawblockbyheight", bitcoind->log, NULL, getrawblockbyheight_callback, - /* Freed in cb. */ - notleak(call)); + call); json_add_num(req->stream, "height", height); jsonrpc_request_end(req); bitcoin_plugin_send(bitcoind, req); diff --git a/lightningd/channel_control.c b/lightningd/channel_control.c index ea169e304..c01692220 100644 --- a/lightningd/channel_control.c +++ b/lightningd/channel_control.c @@ -992,7 +992,8 @@ struct command_result *cancel_channel_before_broadcast(struct command *cmd, bitcoind_getutxout(cmd->ld->topology->bitcoind, &cancel_channel->funding, process_check_funding_broadcast, - notleak(tal_steal(NULL, cc))); + /* Freed by callback */ + tal_steal(NULL, cc)); return command_still_pending(cmd); }