Browse Source

lightningd: fix assert() if spawning openingd fails.

My node crashed as follows:

	lightningd: lightningd/peer_control.c:957: peer_connected: Assertion `!peer->uncommitted_channel' failed.

In the logs I found:

	Running lightning_openingd: Cannot allocate memory

Which reveals that we're not freeing uc in that path!

Changelog-Fixed: Fix assertion on reconnect if we fail to run openingd.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
travis-debug
Rusty Russell 5 years ago
committed by Christian Decker
parent
commit
3e311b2510
  1. 1
      lightningd/opening_control.c

1
lightningd/opening_control.c

@ -977,6 +977,7 @@ void peer_start_openingd(struct peer *peer,
tal_fmt(tmpctx,
"Running lightning_openingd: %s",
strerror(errno)));
tal_free(uc);
return;
}

Loading…
Cancel
Save