diff options
Diffstat (limited to 'res/res_pjsip_nat.c')
-rw-r--r-- | res/res_pjsip_nat.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/res/res_pjsip_nat.c b/res/res_pjsip_nat.c index b71a84bbd..6e093abcd 100644 --- a/res/res_pjsip_nat.c +++ b/res/res_pjsip_nat.c @@ -72,8 +72,13 @@ static pj_bool_t handle_rx_message(struct ast_sip_endpoint *endpoint, pjsip_rx_d static pj_bool_t nat_on_rx_message(pjsip_rx_data *rdata) { - RAII_VAR(struct ast_sip_endpoint *, endpoint, ast_pjsip_rdata_get_endpoint(rdata), ao2_cleanup); - return handle_rx_message(endpoint, rdata); + pj_bool_t res; + struct ast_sip_endpoint *endpoint; + + endpoint = ast_pjsip_rdata_get_endpoint(rdata); + res = handle_rx_message(endpoint, rdata); + ao2_cleanup(endpoint); + return res; } /*! \brief Structure which contains information about a transport */ |