mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-22 09:37:04 +00:00
[mod_sofia] Fix possible nua handle leak in sofia_handle_sip_i_refer()
This commit is contained in:
parent
e508795b77
commit
c7a2e40b0c
@ -9047,6 +9047,7 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
|||||||
int deny_refer_requests = 0;
|
int deny_refer_requests = 0;
|
||||||
|
|
||||||
if (!(b_session = switch_core_session_locate(b_private->uuid))) {
|
if (!(b_session = switch_core_session_locate(b_private->uuid))) {
|
||||||
|
nua_handle_unref_user(bnh);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
b_tech_pvt = (private_object_t *) switch_core_session_get_private(b_session);
|
b_tech_pvt = (private_object_t *) switch_core_session_get_private(b_session);
|
||||||
@ -9402,7 +9403,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
|||||||
}
|
}
|
||||||
switch_core_session_rwunlock(b_session);
|
switch_core_session_rwunlock(b_session);
|
||||||
}
|
}
|
||||||
nua_handle_unref_user(bnh);
|
|
||||||
} else { /* the other channel is on a different box, we have to go find them */
|
} else { /* the other channel is on a different box, we have to go find them */
|
||||||
if (exten && (br_a = switch_channel_get_partner_uuid(channel_a))) {
|
if (exten && (br_a = switch_channel_get_partner_uuid(channel_a))) {
|
||||||
switch_core_session_t *a_session;
|
switch_core_session_t *a_session;
|
||||||
@ -9592,6 +9592,8 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
|||||||
TAG_END());
|
TAG_END());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bnh) nua_handle_unref_user(bnh);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user