diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-07 11:53:52 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-07 11:53:52 +0000 |
commit | 9f00dce061f2b268dd2a710612dbc46dbb37293d (patch) | |
tree | 646572ed21aa0cad9e0a7a0cf3d546bec57fd42a /channels | |
parent | ccb307b7a87bd930f286efcf887513f034cab9da (diff) |
As pointed out on the -dev list, actually use the result of find_peer() so that
a peer reference is not leaked.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@128564 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 93bc400e3..83b9a7ebb 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11687,8 +11687,9 @@ static enum check_auth_result check_peer_ok(struct sip_pvt *p, char *of, peer = find_peer(of, NULL, TRUE, FALSE); /* If not found, then find device on IP (if it's not a SUBSCRIBE) */ - if (!peer && sipmethod != SIP_SUBSCRIBE) - find_peer(NULL, &p->recv, TRUE, FALSE); + if (!peer && sipmethod != SIP_SUBSCRIBE) { + peer = find_peer(NULL, &p->recv, TRUE, FALSE); + } if (!peer) { if (debug) |