mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
utils: remove tal_tmpctx altogether, use global.
In particular, we now only free tmpctx at the end of main(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -33,10 +33,8 @@ struct oneshot *new_reltimer_(struct timers *timers,
|
||||
void timer_expired(tal_t *ctx, struct timer *timer)
|
||||
{
|
||||
struct oneshot *t = container_of(timer, struct oneshot, timer);
|
||||
const tal_t *tmpctx = tal_tmpctx(ctx);
|
||||
|
||||
/* If it doesn't free itself, freeing tmpctx will do it */
|
||||
tal_steal(tmpctx, t);
|
||||
t->cb(t->arg);
|
||||
tal_free(tmpctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user