channeld: fix corruption when dealing with queued packets.

master is not actually a tal object!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-09-04 17:05:31 +09:30
committed by Christian Decker
parent c92dd56dd5
commit 4e81d2431b

View File

@@ -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);
}
}