[asterisk-commits] rmudgett: branch 1.8 r325614 - /branches/1.8/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 29 13:16:49 CDT 2011


Author: rmudgett
Date: Wed Jun 29 13:16:45 2011
New Revision: 325614

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=325614
Log:
Fixed some error exit cleanup in app_queue.c.

* Fixed error exit cleanup in app_queue.c copy_rules() and
reload_queue_rules().

Modified:
    branches/1.8/apps/app_queue.c

Modified: branches/1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_queue.c?view=diff&rev=325614&r1=325613&r2=325614
==============================================================================
--- branches/1.8/apps/app_queue.c (original)
+++ branches/1.8/apps/app_queue.c Wed Jun 29 13:16:45 2011
@@ -1759,7 +1759,7 @@
  * \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;
@@ -5772,7 +5772,6 @@
 			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;
@@ -6497,6 +6496,7 @@
 	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));




More information about the asterisk-commits mailing list