mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-16 00:04:13 +00:00
fix possible register memory leak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8281 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
b48ee12c1c
commit
a41fa2e2bc
4 files changed
+16
-4
No files matched your search
@@ -194,7 +194,7 @@ void sofia_event_callback(nua_event_t event,
|
||||
switch_channel_t *channel = NULL;
|
||||
sofia_gateway_t *gateway = NULL;
|
||||
|
||||
if (sofia_private) {
|
||||
if (sofia_private && sofia_private != &mod_sofia_globals.destroy_private) {
|
||||
if ((gateway = sofia_private->gateway)) {
|
||||
if (switch_thread_rwlock_tryrdlock(gateway->profile->rwlock) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Profile %s is locked\n", gateway->profile->name);
|
||||
@@ -356,6 +356,11 @@ void sofia_event_callback(nua_event_t event,
|
||||
|
||||
done:
|
||||
|
||||
if (sofia_private && sofia_private->destroy_nh) {
|
||||
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroy handle requested.\n");
|
||||
nua_handle_destroy(nh);
|
||||
}
|
||||
|
||||
if (gateway) {
|
||||
sofia_reg_release_gateway(gateway);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user