Merge "res_ari_channels: Fix reference leak in channel_state_invalid."
This commit is contained in:
commit
0036a00775
1 changed files with 4 additions and 0 deletions
|
@ -99,9 +99,13 @@ static int channel_state_invalid(struct stasis_app_control *control,
|
||||||
|| snapshot->state == AST_STATE_RINGING) {
|
|| snapshot->state == AST_STATE_RINGING) {
|
||||||
ast_ari_response_error(response, 412, "Precondition Failed",
|
ast_ari_response_error(response, 412, "Precondition Failed",
|
||||||
"Channel in invalid state");
|
"Channel in invalid state");
|
||||||
|
ao2_ref(snapshot, -1);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ao2_ref(snapshot, -1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue