libplugin: mark the cmd notleak() whenever command_still_pending() called.

This is what we do in lightningd, which makes memleak much more forgiving:
you can hang temporaries off cmd without getting reports of leaks (also
when send_outreq called).

We remove all the notleak() calls in plugins which worked around this!
And avoid multiple notleak labels, since both send_outreq() and
command_still_pending() can be called multiple times.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-09-16 12:45:03 +09:30
parent 701dd3dcef
commit 5b58eda748
8 changed files with 19 additions and 37 deletions

View File

@@ -782,9 +782,6 @@ static struct command_result *sendrawtransaction(struct command *cmd,
} else
highfeesarg = NULL;
/* Keep memleak happy! */
tal_free(allowhighfees);
start_bitcoin_cli(NULL, cmd, process_sendrawtransaction, true,
BITCOIND_HIGH_PRIO, NULL,
"sendrawtransaction",