diff --git a/apps/app_queue.c b/apps/app_queue.c index 33fc539d7586cbfcd7480c5888c68270bc8a87b1..46157742d3ea6ce4cea73d0804883a23cfe56c5a 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2623,6 +2623,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce struct callattempt *tmp = ast_calloc(1, sizeof(*tmp)); if (!tmp) { + ao2_ref(cur, -1); ast_mutex_unlock(&qe->parent->lock); if (use_weight) AST_LIST_UNLOCK(&queues);