Files
lightning/lightningd
Rusty Russell 2fe2a0bcf9 peer_control: don't double-free on permanent fail of non-persistent peer.
peer_fail_permanent() frees peer->owner, but for bad_peer() we're
being called by the sd->badpeercb(), which then goes on to
io_close(conn) which is a child of sd.

We need to detach the two for this case, so neither tries to free the
other.

This leads to a corner case when the subd exits after the peer is gone:
subd->peer is NULL, so we have to handle that too.

Fixes: #282
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-09-28 15:37:43 +02:00
..
2017-09-12 22:59:24 +02:00
2017-08-29 17:54:14 +02:00
2017-08-29 17:54:14 +02:00
2017-08-29 17:54:14 +02:00
2017-08-29 17:54:14 +02:00
2017-08-29 17:54:14 +02:00
2017-08-29 17:54:14 +02:00
2017-08-29 17:54:14 +02:00
2017-09-28 13:07:05 +09:30
2017-08-29 17:54:14 +02:00