mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Don't free private structure until iax2_hangup is actually called
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1038,9 +1038,11 @@ retry:
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
iaxs[callno] = NULL;
|
||||
if (!owner)
|
||||
iaxs[callno] = NULL;
|
||||
if (pvt) {
|
||||
pvt->owner = NULL;
|
||||
if (!owner)
|
||||
pvt->owner = NULL;
|
||||
/* No more pings or lagrq's */
|
||||
if (pvt->pingid > -1)
|
||||
ast_sched_del(sched, pvt->pingid);
|
||||
@@ -1063,7 +1065,6 @@ retry:
|
||||
|
||||
if (owner) {
|
||||
/* If there's an owner, prod it to give up */
|
||||
owner->pvt->pvt = NULL;
|
||||
owner->_softhangup |= AST_SOFTHANGUP_DEV;
|
||||
ast_queue_hangup(owner, 0);
|
||||
}
|
||||
@@ -1076,7 +1077,8 @@ retry:
|
||||
if (pvt->reg) {
|
||||
pvt->reg->callno = 0;
|
||||
}
|
||||
free(pvt);
|
||||
if (!owner)
|
||||
free(pvt);
|
||||
}
|
||||
if (owner) {
|
||||
ast_mutex_unlock(&owner->lock);
|
||||
|
Reference in New Issue
Block a user