diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-10 16:30:46 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-10 16:30:46 +0000 |
commit | 71e1a364c81e280d84c6368a094e8860f2758aad (patch) | |
tree | edd04673a1e4644b8212495ed75ee03df6cebaf3 /apps/app_queue.c | |
parent | 07e6ddf14fd781b995260ef848c94258c1f9eee1 (diff) |
Merged revisions 92202 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r92202 | mmichelson | 2007-12-10 10:29:44 -0600 (Mon, 10 Dec 2007) | 7 lines
If there are no members in a queue, then the loop where the datastore for detecting
duplicate dialed numbers will be skipped, meaning the datastore isn't created. This means
that when we try to free it, there's a crash. This stops that crash from occurring.
(closes issue #11499, reported by slavon, patched by eliel)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92203 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index bd8fb5057..1fa81dc7c 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2912,8 +2912,10 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce if (use_weight) ao2_unlock(queues); lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed); - ast_channel_datastore_remove(qe->chan, datastore); - ast_channel_datastore_free(datastore); + if (datastore) { + ast_channel_datastore_remove(qe->chan, datastore); + ast_channel_datastore_free(datastore); + } ao2_lock(qe->parent); if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY) { store_next_rr(qe, outgoing); |