jsonrpc: current pending commands are not a leak.

The pay command in particular, attaches a reasonable number of
temporaries to cmd, knowing they'll be freed once cmd is done.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-12-15 20:59:21 +10:30
committed by Christian Decker
parent 1356913143
commit 38a0ee8638

View File

@@ -441,6 +441,8 @@ void command_fail(struct command *cmd, const char *fmt, ...)
void command_still_pending(struct command *cmd)
{
notleak_with_children(cmd);
notleak(cmd->jcon);
cmd->pending = true;
}