diff --git a/hsmd/hsmd.c b/hsmd/hsmd.c index a7342a2e1..a236131f1 100644 --- a/hsmd/hsmd.c +++ b/hsmd/hsmd.c @@ -165,6 +165,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); } @@ -187,6 +188,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;