diff --git a/common/utils.c b/common/utils.c index a9ed0f23c..311de3e0a 100644 --- a/common/utils.c +++ b/common/utils.c @@ -32,8 +32,16 @@ void tal_wally_end(const tal_t *parent) { tal_t *p; while ((p = tal_first(wally_tal_ctx)) != NULL) { - if (p != parent) + if (p != parent) { +#if DEVELOPER + /* Don't steal backtrace from wally_tal_ctx! */ + if (tal_name(p) && streq(tal_name(p), "backtrace")) { + tal_free(p); + continue; + } +#endif /* DEVELOPER */ tal_steal(parent, p); + } } wally_tal_ctx = tal_free(wally_tal_ctx); }