[asterisk-commits] branch 1.2 - r7665 /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Dec 28 11:35:57 CST 2005


Author: russell
Date: Wed Dec 28 11:35:56 2005
New Revision: 7665

URL: http://svn.digium.com/view/asterisk?rev=7665&view=rev
Log:
fix memory leak in build_rpid (issue #6070)

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?rev=7665&r1=7664&r2=7665&view=diff
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Wed Dec 28 11:35:56 2005
@@ -4631,13 +4631,10 @@
 	if (p->rpid || p->rpid_from)
 		return;
 
-	if (p->owner && p->owner->cid.cid_num) {
-		clid = strdup(p->owner->cid.cid_num);
-	} 
-
-	if (p->owner && p->owner->cid.cid_name) {
-		clin = strdup(p->owner->cid.cid_name);
-	}
+	if (p->owner && p->owner->cid.cid_num)
+		clid = p->owner->cid.cid_num;
+	if (p->owner && p->owner->cid.cid_name)
+		clin = p->owner->cid.cid_name;
 	if (ast_strlen_zero(clin))
 		clin = clid;
 



More information about the asterisk-commits mailing list