diff --git a/main/channel.c b/main/channel.c index 1f18d53b15ccdfd84356bbd18816a9533f5725c2..94505ad0e8370a1fa1d6130a554298e920a16532 100644 --- a/main/channel.c +++ b/main/channel.c @@ -6093,7 +6093,7 @@ struct ast_channel *ast_request(const char *type, struct ast_format_cap *request if (set_security_requirements(requestor, c)) { ast_log(LOG_WARNING, "Setting security requirements failed\n"); - c = ast_channel_release(c); + ast_hangup(c); *cause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL; return NULL; }