mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
[mod_sofia] fix memleak with invalid hostname as gw/proxy
This commit is contained in:
parent
ea74d2a5d6
commit
392bc26a43
@ -203,12 +203,14 @@ void sofia_reg_unregister(sofia_profile_t *profile)
|
||||
if (gateway_ptr->state == REG_STATE_REGED) {
|
||||
sofia_reg_kill_reg(gateway_ptr);
|
||||
}
|
||||
sofia_private_free(gateway_ptr->sofia_private);
|
||||
|
||||
for (gw_sub_ptr = gateway_ptr->subscriptions; gw_sub_ptr; gw_sub_ptr = gw_sub_ptr->next) {
|
||||
|
||||
if (gw_sub_ptr->state == SUB_STATE_SUBED) {
|
||||
sofia_reg_kill_sub(gw_sub_ptr);
|
||||
}
|
||||
sofia_private_free(gw_sub_ptr->sofia_private);
|
||||
}
|
||||
|
||||
gateway_ptr->subscriptions = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user