mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Check registry carefully before unlinking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -889,7 +889,14 @@ static void __sip_destroy(struct sip_pvt *p, int lockowner)
|
||||
p->route = NULL;
|
||||
}
|
||||
if (p->registry) {
|
||||
p->registry->call=NULL;
|
||||
/* Carefully unlink from registry */
|
||||
struct sip_registry *reg;
|
||||
reg = registrations;
|
||||
while(reg) {
|
||||
if ((reg == p->registry) && (p->registry->call == p))
|
||||
p->registry->call=NULL;
|
||||
reg = reg->next;
|
||||
}
|
||||
}
|
||||
/* Unlink us from the owner if we have one */
|
||||
if (p->owner) {
|
||||
|
Reference in New Issue
Block a user