summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 151f03cd4..a566c9aed 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1973,9 +1973,17 @@ static int insert_penaltychange(const char *list_name, const char *content, cons
if (!inserted) {
AST_LIST_INSERT_TAIL(&rl_iter->rules, rule, list);
+ inserted = 1;
}
+
+ break;
}
+ if (!inserted) {
+ ast_log(LOG_WARNING, "Unknown rule list name %s; ignoring.\n", list_name);
+ ast_free(rule);
+ return -1;
+ }
return 0;
}
@@ -4538,6 +4546,7 @@ static struct ast_datastore *setup_transfer_datastore(struct queue_ent *qe, stru
ast_channel_lock(qe->chan);
if (!(ds = ast_datastore_alloc(&queue_transfer_info, NULL))) {
ast_channel_unlock(qe->chan);
+ ast_free(qtds);
ast_log(LOG_WARNING, "Unable to create transfer datastore. queue_log will not show attended transfer\n");
return NULL;
}