summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/app_queue.c1
-rw-r--r--main/hashtab.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 6dfb14356..5a8dcd246 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -6500,7 +6500,6 @@ static int try_calling(struct queue_ent *qe, struct ast_flags opts, char **opt_a
ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT),
forwardsallowed, ringing);
- ast_channel_unlock(qe->chan);
ao2_lock(qe->parent);
if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY || qe->parent->strategy == QUEUE_STRATEGY_RRORDERED) {
store_next_rr(qe, outgoing);
diff --git a/main/hashtab.c b/main/hashtab.c
index 4b765979f..9b334d4a5 100644
--- a/main/hashtab.c
+++ b/main/hashtab.c
@@ -745,6 +745,8 @@ struct ast_hashtab_iter *ast_hashtab_start_write_traversal(struct ast_hashtab *t
void ast_hashtab_end_traversal(struct ast_hashtab_iter *it)
{
+ if (!it)
+ return;
if (it->tab->do_locking)
ast_rwlock_unlock(&it->tab->lock);
free(it);