diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index ebc8f2aa6b..1c14c473d7 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1502,6 +1502,10 @@ static void our_sofia_event_callback(nua_event_t event, nua_handle_bind(nh, NULL); } + if (tech_pvt && (tech_pvt->nh == nh)) { + tech_pvt->nh = NULL; + } + nua_handle_destroy(nh); nh = NULL; }