[asterisk-commits] rmudgett: branch group/CCSS r240224 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 14 14:04:07 CST 2010


Author: rmudgett
Date: Thu Jan 14 14:04:06 2010
New Revision: 240224

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=240224
Log:
Must cc_unref agents not ast_free them.

Modified:
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=240224&r1=240223&r2=240224
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Jan 14 14:04:06 2010
@@ -1864,19 +1864,19 @@
 
 	agent->core_id = core_id;
 	if (!(agent->callbacks = find_agent_callbacks(caller_chan))) {
-		ast_free(agent);
+		cc_unref(agent, "Could not find agent callbacks.");
 		return NULL;
 	}
 	check_callback_sanity(agent->callbacks);
 	if (!(agent->cc_params = ast_cc_config_params_init())) {
-		ast_free(agent);
+		cc_unref(agent, "Could not init agent config params.");
 		return NULL;
 	}
 	strcpy(agent->interface, caller_name);
 	ast_cc_copy_config_params(agent->cc_params, ast_channel_get_cc_config_params(caller_chan));
 	if (agent->callbacks->init(agent, caller_chan)) {
 		ast_cc_config_params_destroy(agent->cc_params);
-		ast_free(agent);
+		cc_unref(agent, "Agent init callback failed.");
 		return NULL;
 	}
 	agent->interface_tree = cc_ref(interface_tree, "Agent now has reference to interface tree");




More information about the asterisk-commits mailing list