aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-29 18:18:00 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-29 18:18:00 +0000
commit68a9aa5cf9e15f37078cf2690da803fabdf63cb2 (patch)
tree6ca71f646c6a7b01997fa311b4c2501b6fdc8c31 /apps
parenta949df839368875308ac104c24b8a4a84d8b3eec (diff)
Merged revisions 325614 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r325614 | rmudgett | 2011-06-29 13:16:45 -0500 (Wed, 29 Jun 2011) | 5 lines Fixed some error exit cleanup in app_queue.c. * Fixed error exit cleanup in app_queue.c copy_rules() and reload_queue_rules(). ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@325616 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 69bee045c..e45ea9169 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1781,7 +1781,7 @@ static void clear_queue(struct call_queue *q)
* \retval 0 on success
* \note Call this with the rule_lists locked
*/
-static int insert_penaltychange (const char *list_name, const char *content, const int linenum)
+static int insert_penaltychange(const char *list_name, const char *content, const int linenum)
{
char *timestr, *maxstr, *minstr, *contentdup;
struct penalty_rule *rule = NULL, *rule_iter;
@@ -5847,7 +5847,6 @@ static void copy_rules(struct queue_ent *qe, const char *rulename)
struct penalty_rule *new_pr = ast_calloc(1, sizeof(*new_pr));
if (!new_pr) {
ast_log(LOG_ERROR, "Memory allocation error when copying penalty rules! Aborting!\n");
- AST_LIST_UNLOCK(&rule_lists);
break;
}
new_pr->time = pr_iter->time;
@@ -6661,6 +6660,7 @@ static int reload_queue_rules(int reload)
while ((rulecat = ast_category_browse(cfg, rulecat))) {
if (!(new_rl = ast_calloc(1, sizeof(*new_rl)))) {
AST_LIST_UNLOCK(&rule_lists);
+ ast_config_destroy(cfg);
return AST_MODULE_LOAD_FAILURE;
} else {
ast_copy_string(new_rl->name, rulecat, sizeof(new_rl->name));