From: Andrey Volk Date: Wed, 16 Jun 2021 08:18:15 +0000 (+0300) Subject: [mod_sofia] Calling direct _unref() functions in sofia_event_callback() is unsafe. X-Git-Tag: v1.10.7^2~318 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65d0665a95daf1b030d8dc24d5838305403a2c57;p=thirdparty%2Ffreeswitch.git [mod_sofia] Calling direct _unref() functions in sofia_event_callback() is unsafe. --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 9ebd0ee35f..70ed479ab5 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2581,8 +2581,8 @@ void sofia_event_callback(nua_event_t event, profile->queued_events--; switch_mutex_unlock(profile->flag_mutex); - nua_handle_unref(nh); - nua_unref(nua); + nua_handle_unref_user(nh); + nua_unref_user(nua); goto end; } @@ -2619,8 +2619,8 @@ void sofia_event_callback(nua_event_t event, profile->queued_events--; switch_mutex_unlock(profile->flag_mutex); - nua_handle_unref(nh); - nua_unref(nua); + nua_handle_unref_user(nh); + nua_unref_user(nua); goto end; }