mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 07:01:09 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@80499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -5432,11 +5432,13 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin,
|
|||||||
/* No specified host, or this is our host */
|
/* No specified host, or this is our host */
|
||||||
) {
|
) {
|
||||||
res = authenticate(p->challenge, peer->secret, peer->outkey, authmethods, &ied, sin, &p->ecx, &p->dcx);
|
res = authenticate(p->challenge, peer->secret, peer->outkey, authmethods, &ied, sin, &p->ecx, &p->dcx);
|
||||||
|
if (!res) {
|
||||||
peer_unref(peer);
|
peer_unref(peer);
|
||||||
if (!res)
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
peer_unref(peer);
|
||||||
|
}
|
||||||
if (!peer) {
|
if (!peer) {
|
||||||
/* We checked our list and didn't find one. It's unlikely, but possible,
|
/* We checked our list and didn't find one. It's unlikely, but possible,
|
||||||
that we're trying to authenticate *to* a realtime peer */
|
that we're trying to authenticate *to* a realtime peer */
|
||||||
|
Reference in New Issue
Block a user