Browse Source

cryptopkt: free output packets after encryption.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
642a2f2d4e
  1. 2
      daemon/cryptopkt.c

2
daemon/cryptopkt.c

@ -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…
Cancel
Save