[asterisk-commits] mnicholson: branch 1.4 r299220 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 20 21:21:47 UTC 2010


Author: mnicholson
Date: Mon Dec 20 15:21:39 2010
New Revision: 299220

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=299220
Log:
Use ast_free() instead of free()

ABE-2656

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=299220&r1=299219&r2=299220
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Mon Dec 20 15:21:39 2010
@@ -14301,7 +14301,7 @@
 
 	if (!transferee || !transferer) {
 		ast_log(LOG_ERROR, "Missing channels for parking! Transferer %s Transferee %s\n", transferer ? "<available>" : "<missing>", transferee ? "<available>" : "<missing>" );
-		free(d);
+		ast_free(d);
 		return NULL;
 	}
 	if (option_debug > 3) 
@@ -14312,7 +14312,7 @@
 		ast_log(LOG_WARNING, "Masquerade failed.\n");
 		transmit_response(transferer->tech_pvt, "503 Internal error", &req);
 		ast_channel_unlock(transferee);
-		free(d);
+		ast_free(d);
 		return NULL;
 	} 
 	ast_channel_unlock(transferee);
@@ -14347,7 +14347,7 @@
 			ast_log(LOG_DEBUG, "SIP Call parked failed \n");
 		/* Do not hangup call */
 	}
-	free(d);
+	ast_free(d);
 	return NULL;
 }
 
@@ -14444,7 +14444,7 @@
 	d->seqno = seqno;
 	if (ast_pthread_create_background(&th, &attr, sip_park_thread, d) < 0) {
 		/* Could not start thread */
-		free(d);	/* We don't need it anymore. If thread is created, d will be free'd
+		ast_free(d);	/* We don't need it anymore. If thread is created, d will be free'd
 				   by sip_park_thread() */
 		pthread_attr_destroy(&attr);
 		return -1;




More information about the asterisk-commits mailing list