mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-10 03:48:34 +00:00
Merge "chan_sip: Fix memory leaks." into 13
This commit is contained in:
@@ -23168,6 +23168,8 @@ static void change_redirecting_information(struct sip_pvt *p, struct sip_request
|
|||||||
redirecting->from.number.valid = 1;
|
redirecting->from.number.valid = 1;
|
||||||
ast_free(redirecting->from.number.str);
|
ast_free(redirecting->from.number.str);
|
||||||
redirecting->from.number.str = redirecting_from_number;
|
redirecting->from.number.str = redirecting_from_number;
|
||||||
|
} else {
|
||||||
|
ast_free(redirecting_from_number);
|
||||||
}
|
}
|
||||||
if (!ast_strlen_zero(redirecting_from_name)) {
|
if (!ast_strlen_zero(redirecting_from_name)) {
|
||||||
ast_debug(3, "Got redirecting from name %s\n", redirecting_from_name);
|
ast_debug(3, "Got redirecting from name %s\n", redirecting_from_name);
|
||||||
@@ -23175,6 +23177,8 @@ static void change_redirecting_information(struct sip_pvt *p, struct sip_request
|
|||||||
redirecting->from.name.valid = 1;
|
redirecting->from.name.valid = 1;
|
||||||
ast_free(redirecting->from.name.str);
|
ast_free(redirecting->from.name.str);
|
||||||
redirecting->from.name.str = redirecting_from_name;
|
redirecting->from.name.str = redirecting_from_name;
|
||||||
|
} else {
|
||||||
|
ast_free(redirecting_from_name);
|
||||||
}
|
}
|
||||||
if (!ast_strlen_zero(p->cid_tag)) {
|
if (!ast_strlen_zero(p->cid_tag)) {
|
||||||
ast_free(redirecting->from.tag);
|
ast_free(redirecting->from.tag);
|
||||||
@@ -23188,13 +23192,17 @@ static void change_redirecting_information(struct sip_pvt *p, struct sip_request
|
|||||||
redirecting->to.number.valid = 1;
|
redirecting->to.number.valid = 1;
|
||||||
ast_free(redirecting->to.number.str);
|
ast_free(redirecting->to.number.str);
|
||||||
redirecting->to.number.str = redirecting_to_number;
|
redirecting->to.number.str = redirecting_to_number;
|
||||||
|
} else {
|
||||||
|
ast_free(redirecting_to_number);
|
||||||
}
|
}
|
||||||
if (!ast_strlen_zero(redirecting_to_name)) {
|
if (!ast_strlen_zero(redirecting_to_name)) {
|
||||||
ast_debug(3, "Got redirecting to name %s\n", redirecting_from_number);
|
ast_debug(3, "Got redirecting to name %s\n", redirecting_to_name);
|
||||||
update_redirecting->to.name = 1;
|
update_redirecting->to.name = 1;
|
||||||
redirecting->to.name.valid = 1;
|
redirecting->to.name.valid = 1;
|
||||||
ast_free(redirecting->to.name.str);
|
ast_free(redirecting->to.name.str);
|
||||||
redirecting->to.name.str = redirecting_to_name;
|
redirecting->to.name.str = redirecting_to_name;
|
||||||
|
} else {
|
||||||
|
ast_free(redirecting_to_name);
|
||||||
}
|
}
|
||||||
redirecting->reason.code = reason;
|
redirecting->reason.code = reason;
|
||||||
ast_free(redirecting->reason.str);
|
ast_free(redirecting->reason.str);
|
||||||
@@ -24223,6 +24231,7 @@ static void handle_response_subscribe(struct sip_pvt *p, int resp, const char *r
|
|||||||
ast_cc_monitor_failed(monitor_instance->core_id,
|
ast_cc_monitor_failed(monitor_instance->core_id,
|
||||||
monitor_instance->device_name,
|
monitor_instance->device_name,
|
||||||
"Received error response to our SUBSCRIBE");
|
"Received error response to our SUBSCRIBE");
|
||||||
|
ao2_ref(monitor_instance, -1);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user