mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
common: check for outstanding taken() pointers in common_shutdown.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
ae1a130ab5
commit
39f4ca98b5
1 changed files with 4 additions and 0 deletions
|
@ -44,6 +44,10 @@ void common_setup(const char *argv0)
|
||||||
|
|
||||||
void common_shutdown(void)
|
void common_shutdown(void)
|
||||||
{
|
{
|
||||||
|
const char *p = taken_any();
|
||||||
|
if (p)
|
||||||
|
errx(1, "outstanding taken(): %s", p);
|
||||||
|
take_cleanup();
|
||||||
tal_free(tmpctx);
|
tal_free(tmpctx);
|
||||||
wally_cleanup(0);
|
wally_cleanup(0);
|
||||||
tal_free(wally_tal_ctx);
|
tal_free(wally_tal_ctx);
|
||||||
|
|
Loading…
Add table
Reference in a new issue