summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/threadpool.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/threadpool.c b/main/threadpool.c
index bc0187f1e..1da0d0766 100644
--- a/main/threadpool.c
+++ b/main/threadpool.c
@@ -623,6 +623,8 @@ struct ast_threadpool *ast_threadpool_create(struct ast_threadpool_listener *lis
pool = tps_listener->private_data;
pool->tps = tps;
+ ao2_ref(listener, +1);
+ pool->listener = listener;
ast_threadpool_set_size(pool, initial_size);
return pool;
}