mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
cryptopkt: free output packets after encryption.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
95a01670ac
commit
642a2f2d4e
@ -331,6 +331,8 @@ struct io_plan *peer_write_packet(struct io_conn *conn,
|
||||
tal_free(iod->out.cpkt);
|
||||
|
||||
iod->out.cpkt = encrypt_pkt(iod, pkt, &totlen);
|
||||
/* Free unencrypted packet. */
|
||||
tal_free(pkt);
|
||||
|
||||
return io_write(conn, iod->out.cpkt, totlen, next, peer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user