From 4e81d2431b17ac9929f2aa06d287bf7db56d67a3 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 4 Sep 2017 17:05:31 +0930 Subject: [PATCH] channeld: fix corruption when dealing with queued packets. master is not actually a tal object! Signed-off-by: Rusty Russell --- channeld/channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channeld/channel.c b/channeld/channel.c index 42fb62d8f..320312e7f 100644 --- a/channeld/channel.c +++ b/channeld/channel.c @@ -1970,7 +1970,7 @@ out: if (msg) { /* Free old packet exactly like daemon_conn_read_next */ master->msg_in = tal_free(master->msg_in); - master->msg_in = cast_const(u8 *, tal_steal(master,msg)); + master->msg_in = cast_const(u8 *, tal_steal(peer, msg)); return req_in(conn, master); } }