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: https://origsvn.digium.com/svn/asterisk/trunk@80500
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
/* 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,