- fixed null pointer: channel cleanup must be done at end of hangup
This commit is contained in:
parent
2f3a449f5b
commit
25dceb2571
|
@ -1107,9 +1107,6 @@ static int pbx_capi_hangup(struct ast_channel *c)
|
|||
|
||||
ast_update_use_count();
|
||||
|
||||
CC_CHANNEL_PVT(c) = NULL;
|
||||
ast_setstate(c, AST_STATE_DOWN);
|
||||
|
||||
if ((i->doDTMF > 0) && (i->vad != NULL)) {
|
||||
ast_dsp_free(i->vad);
|
||||
i->vad = NULL;
|
||||
|
@ -1126,6 +1123,9 @@ static int pbx_capi_hangup(struct ast_channel *c)
|
|||
capi_activehangup(c, state);
|
||||
}
|
||||
|
||||
CC_CHANNEL_PVT(c) = NULL;
|
||||
ast_setstate(c, AST_STATE_DOWN);
|
||||
|
||||
cc_mutex_lock(&usecnt_lock);
|
||||
usecnt--;
|
||||
cc_mutex_unlock(&usecnt_lock);
|
||||
|
|
Loading…
Reference in New Issue