[asterisk-commits] mmichelson: branch 1.4 r92202 - /branches/1.4/apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Dec 10 10:29:45 CST 2007
Author: mmichelson
Date: Mon Dec 10 10:29:44 2007
New Revision: 92202
URL: http://svn.digium.com/view/asterisk?view=rev&rev=92202
Log:
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)
Modified:
branches/1.4/apps/app_queue.c
Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=92202&r1=92201&r2=92202
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Mon Dec 10 10:29:44 2007
@@ -2663,8 +2663,10 @@
if (use_weight)
AST_LIST_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);
+ }
ast_mutex_lock(&qe->parent->lock);
if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY) {
store_next(qe, outgoing);
More information about the asterisk-commits
mailing list