[asterisk-commits] murf: branch 1.6.1 r143561 - in /branches/1.6.1: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 18 18:55:03 CDT 2008


Author: murf
Date: Thu Sep 18 18:55:02 2008
New Revision: 143561

URL: http://svn.digium.com/view/asterisk?view=rev&rev=143561
Log:
Merged revisions 143559 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r143559 | murf | 2008-09-18 17:41:33 -0600 (Thu, 18 Sep 2008) | 9 lines

Merged revisions 143534 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r143534 | murf | 2008-09-18 16:11:51 -0600 (Thu, 18 Sep 2008) | 1 line

A micro-fix, in sip_park_thread, where d is freed before the func is done using it.
........

................

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_sip.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=143561&r1=143560&r2=143561
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Thu Sep 18 18:55:02 2008
@@ -16253,12 +16253,12 @@
 	transferee = d->chan1;
 	transferer = d->chan2;
 	copy_request(&req, &d->req);
-	if (d->req.data)
-		ast_free(d->req.data);
-	ast_free(d);
 
 	if (!transferee || !transferer) {
 		ast_log(LOG_ERROR, "Missing channels for parking! Transferer %s Transferee %s\n", transferer ? "<available>" : "<missing>", transferee ? "<available>" : "<missing>" );
+		if (d->req.data)
+			ast_free(d->req.data);
+		free(d);
 		return NULL;
 	}
 	ast_debug(4, "SIP Park: Transferer channel %s, Transferee %s\n", transferer->name, transferee->name);
@@ -16268,6 +16268,9 @@
 		ast_log(LOG_WARNING, "Masquerade failed.\n");
 		transmit_response(transferer->tech_pvt, "503 Internal error", &req);
 		ast_channel_unlock(transferee);
+		if (d->req.data)
+			ast_free(d->req.data);
+		free(d);
 		return NULL;
 	} 
 	ast_channel_unlock(transferee);
@@ -16301,6 +16304,9 @@
 		ast_debug(1, "SIP Call parked failed \n");
 		/* Do not hangup call */
 	}
+	if (d->req.data)
+		ast_free(d->req.data);
+	free(d);
 	return NULL;
 }
 




More information about the asterisk-commits mailing list