commando: free incmd as soon as we use it.

Otherwise we left it in the cache, causing "New cmd replacing old"
messages.
This commit is contained in:
Rusty Russell
2022-07-26 13:42:03 +09:30
committed by neil saitug
parent 8da361b49b
commit 9aa9a8236f

View File

@@ -485,6 +485,7 @@ static void handle_incmd(struct node_id *peer,
} }
try_command(peer, idnum, incmd->contents, tal_bytelen(incmd->contents)); try_command(peer, idnum, incmd->contents, tal_bytelen(incmd->contents));
tal_free(incmd);
} }
static struct command_result *handle_reply(struct node_id *peer, static struct command_result *handle_reply(struct node_id *peer,