mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-29 23:39:35 +00:00 
			
		
		
		
	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: https://origsvn.digium.com/svn/asterisk/branches/1.8@325614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -5772,7 +5772,6 @@ static void copy_rules(struct queue_ent *qe, const char *rulename) | |||||||
| 			struct penalty_rule *new_pr = ast_calloc(1, sizeof(*new_pr)); | 			struct penalty_rule *new_pr = ast_calloc(1, sizeof(*new_pr)); | ||||||
| 			if (!new_pr) { | 			if (!new_pr) { | ||||||
| 				ast_log(LOG_ERROR, "Memory allocation error when copying penalty rules! Aborting!\n"); | 				ast_log(LOG_ERROR, "Memory allocation error when copying penalty rules! Aborting!\n"); | ||||||
| 				AST_LIST_UNLOCK(&rule_lists); |  | ||||||
| 				break; | 				break; | ||||||
| 			} | 			} | ||||||
| 			new_pr->time = pr_iter->time; | 			new_pr->time = pr_iter->time; | ||||||
| @@ -6497,6 +6496,7 @@ static int reload_queue_rules(int reload) | |||||||
| 	while ((rulecat = ast_category_browse(cfg, rulecat))) { | 	while ((rulecat = ast_category_browse(cfg, rulecat))) { | ||||||
| 		if (!(new_rl = ast_calloc(1, sizeof(*new_rl)))) { | 		if (!(new_rl = ast_calloc(1, sizeof(*new_rl)))) { | ||||||
| 			AST_LIST_UNLOCK(&rule_lists); | 			AST_LIST_UNLOCK(&rule_lists); | ||||||
|  | 			ast_config_destroy(cfg); | ||||||
| 			return AST_MODULE_LOAD_FAILURE; | 			return AST_MODULE_LOAD_FAILURE; | ||||||
| 		} else { | 		} else { | ||||||
| 			ast_copy_string(new_rl->name, rulecat, sizeof(new_rl->name)); | 			ast_copy_string(new_rl->name, rulecat, sizeof(new_rl->name)); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user