[mod_sofia] Calling direct _unref() functions in sofia_event_callback() is unsafe.

This commit is contained in:
Andrey Volk 2021-06-16 11:18:15 +03:00
parent 9b91e82fa8
commit 65d0665a95
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}