diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-28 17:35:56 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-28 17:35:56 +0000 |
commit | 2e6e32e358292154d69b19186e25f32192f14bcf (patch) | |
tree | 2230eeb5f81e0bc0743930de014978e937d990c8 /channels | |
parent | 67df24787b65c320a3b51b44e581337e53a25d19 (diff) |
fix memory leak in build_rpid (issue #6070)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7665 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 10745916e..08c87e88e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4631,13 +4631,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; |