diff --git a/apps/app_queue.c b/apps/app_queue.c index 1c42f8c61e..3aa30b0ac3 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3941,6 +3941,7 @@ static void leave_queue(struct queue_ent *qe) while ((pr_iter = AST_LIST_REMOVE_HEAD(&qe->qe_rules, list))) { ast_free(pr_iter); } + qe->pr = NULL; snprintf(posstr, sizeof(posstr), "%d", qe->pos); pbx_builtin_setvar_helper(qe->chan, "QUEUEPOSITION", posstr); } else {