diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-23 17:04:04 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-23 17:04:04 +0000 |
commit | 96b0dde6d9c53c5f8c2ea6bcf88edd87bea19908 (patch) | |
tree | ae66549850b84946993840c3a783e3591a0fa895 | |
parent | 8e1f27885596f27d6928151a99b773c6bb0e83a6 (diff) |
Merged revisions 80499 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r80499 | russell | 2007-08-23 12:02:50 -0500 (Thu, 23 Aug 2007) | 3 lines
Fix some code where it was possible for a reference to a peer to not get
released when it should. Thank you to Marta Carbone for pointing this out!
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80500 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_iax2.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 8b8f506e7..9290f232c 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -5706,10 +5706,12 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin, /* No specified host, or this is our host */ ) { res = authenticate(p->challenge, peer->secret, peer->outkey, authmethods, &ied, sin, &p->ecx, &p->dcx); - peer_unref(peer); - if (!res) - break; + if (!res) { + peer_unref(peer); + break; + } } + peer_unref(peer); } if (!peer) { /* We checked our list and didn't find one. It's unlikely, but possible, |