[asterisk-commits] jrose: branch jrose/bridge_projects r388222 - /team/jrose/bridge_projects/res...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 9 16:26:46 CDT 2013


Author: jrose
Date: Thu May  9 16:26:44 2013
New Revision: 388222

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388222
Log:
Deal with a memory leak for the subscription data which I didn't know how to resolved before.

Modified:
    team/jrose/bridge_projects/res/parking/parking_bridge_features.c

Modified: team/jrose/bridge_projects/res/parking/parking_bridge_features.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/res/parking/parking_bridge_features.c?view=diff&rev=388222&r1=388221&r2=388222
==============================================================================
--- team/jrose/bridge_projects/res/parking/parking_bridge_features.c (original)
+++ team/jrose/bridge_projects/res/parking/parking_bridge_features.c Thu May  9 16:26:44 2013
@@ -127,6 +127,11 @@
 
 static void parker_update_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message)
 {
+	if (stasis_subscription_final_message(sub, message)) {
+		ast_free(data);
+		return;
+	}
+
 	if (stasis_message_type(message) == ast_parked_call_type()) {
 		struct ast_parked_call_payload *parked_call_message = stasis_message_data(message);
 		parker_parked_call_message_response(parked_call_message, data, sub);




More information about the asterisk-commits mailing list