aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-10-28 17:48:43 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-10-28 17:51:04 +0000
commit8e6f87eb17b562fd3d1def7a65b5dc8346642f8e (patch)
treebe864e34443c498806f9965d07869679bf36ddf4 /render.c
parentterm: open FDs before allocating terminal struct (diff)
render worker context: allocate, and let worker threads free
Since we now initialize the worker threads from term_init(), which returns before the threads terminate, we can no longer use stack-allocated worker contexts. We _could_ put them in the terminal struct. But a simpler solution is to allocate them in term_init(), and let the threads free them when they don't need them anymore.
Diffstat (limited to 'render.c')
-rw-r--r--render.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/render.c b/render.c
index f1eaa9fa..0c559ce0 100644
--- a/render.c
+++ b/render.c
@@ -374,6 +374,7 @@ render_worker_thread(void *_ctx)
struct render_worker_context *ctx = _ctx;
struct terminal *term = ctx->term;
const int my_id = ctx->my_id;
+ free(ctx);
char proc_title[16];
snprintf(proc_title, sizeof(proc_title), "foot:render:%d", my_id);