[asterisk-commits] trunk r33785 - /trunk/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jun 12 21:37:36 MST 2006


Author: russell
Date: Mon Jun 12 23:37:36 2006
New Revision: 33785

URL: http://svn.digium.com/view/asterisk?rev=33785&view=rev
Log:
fix a place where code returns without unlocking the vm users list and various
places where code returns without destroying loaded configuration

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=33785&r1=33784&r2=33785&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Mon Jun 12 23:37:36 2006
@@ -6452,6 +6452,8 @@
 							}
 						} else {
 							free(z);
+							AST_LIST_UNLOCK(&users);
+							ast_config_destroy(cfg);
 							return -1;
 						}
 						var = var->next;
@@ -6706,14 +6708,18 @@
 		return 0;
 	}
 
-	if (!(origtime = ast_variable_retrieve(msg_cfg, "message", "origtime")))
+	if (!(origtime = ast_variable_retrieve(msg_cfg, "message", "origtime"))) {
+		ast_config_destroy(msg_cfg);
 		return 0;
+	}
 
 	cid = ast_variable_retrieve(msg_cfg, "message", "callerid");
 
 	context = ast_variable_retrieve(msg_cfg, "message", "context");
 	if (!strncasecmp("macro",context,5)) /* Macro names in contexts are useless for our needs */
 		context = ast_variable_retrieve(msg_cfg, "message","macrocontext");
+
+	ast_config_destroy(msg_cfg);
 
 	switch (option) {
 	case 3:
@@ -6851,8 +6857,6 @@
 
 		break;
 	}
-
-	ast_config_destroy(msg_cfg);
 
 	if (!res) {
 		make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);



More information about the asterisk-commits mailing list