aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-28 17:37:35 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-28 17:37:35 +0000
commit1c860479760ffefa316ba17ef109d194c04c9748 (patch)
tree89c481da5af44dbc24ecd0f5060e17c917383998
parentddfc7006181445c457a49337e4d6149e8d0dc884 (diff)
Merged revisions 7665 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7665 | russell | 2005-12-28 12:35:56 -0500 (Wed, 28 Dec 2005) | 2 lines fix memory leak in build_rpid (issue #6070) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7666 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3b54128f5..011e7d15b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4628,13 +4628,10 @@ static void build_rpid(struct sip_pvt *p)
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;