Skip to content

Commit

Permalink
plugins/fetchinvoice: fixup ca9557c
Browse files Browse the repository at this point in the history
avoid use after free
  • Loading branch information
endothermicdev committed Dec 8, 2023
1 parent f141449 commit 3cc48b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/fetchinvoice.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,12 +1477,12 @@ static struct command_result *rawrequest_listpeerchannels_done(struct command *c
const jsmntok_t *result,
struct sent *sent)
{
struct pubkey node_id;
/* Hack to store node_id from cmd */
struct pubkey *node_id = sent->path;
sent->path = path_to_node(sent, cmd->plugin, buf, result, node_id);
tal_free(node_id);
node_id = *sent->path;
sent->path = path_to_node(sent, cmd->plugin, buf, result, &node_id);
if (!sent->path) {
return connect_direct(cmd, node_id,
return connect_direct(cmd, &node_id,
sendinvreq_after_connect, sent);
}

Expand Down

0 comments on commit 3cc48b0

Please sign in to comment.