Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hsmd: don't leak message buffers #5051

Merged
merged 1 commit into from
Feb 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions hsmd/hsmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ static struct io_plan *bad_req(struct io_conn *conn,
* and then call handle_client with argument 'c' */
static struct io_plan *client_read_next(struct io_conn *conn, struct client *c)
{
c->msg_in = tal_free(c->msg_in);
return io_read_wire(conn, c, &c->msg_in, handle_client, c);
}

Expand All @@ -190,6 +191,8 @@ static struct client *new_client(const tal_t *ctx,
{
struct client *c = tal(ctx, struct client);

c->msg_in = NULL;

/*~ All-zero pubkey is used for the initial master connection */
if (id) {
c->id = *id;
Expand Down