[asterisk-commits] trunk r35160 - /trunk/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jun 20 14:12:59 MST 2006
Author: oej
Date: Tue Jun 20 16:12:58 2006
New Revision: 35160
URL: http://svn.digium.com/view/asterisk?rev=35160&view=rev
Log:
How many times can we free allocated memory? Many, obviously... ;-)
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=35160&r1=35159&r2=35160&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jun 20 16:12:58 2006
@@ -12089,10 +12089,10 @@
d->chan2 = transferer; /* Transferer */
d->seqno = seqno;
if (!ast_pthread_create(&th, NULL, sip_park_thread, d)) {
- free(d);
+ free(d); /* We don't need it anymore. If thread is created, d will be free'd
+ by sip_park_thread() */
return 0;
}
- free(d);
}
return -1;
}
More information about the asterisk-commits
mailing list