diff --git a/main/taskprocessor.c b/main/taskprocessor.c index 0712a92ff5..5061f47952 100644 --- a/main/taskprocessor.c +++ b/main/taskprocessor.c @@ -445,7 +445,7 @@ static char *cli_tps_report(struct ast_cli_entry *e, int cmd, struct ast_cli_arg maxqsize = p->stats->max_qsize; processed = p->stats->_tasks_processed_count; ast_cli(a->fd, "\n%24s %17lu %12lu %12lu", name, processed, qsize, maxqsize); - ao2_ref(p, -1); + ast_taskprocessor_unreference(p); } ao2_iterator_destroy(&i); tcount = ao2_container_count(tps_singletons);