提交 3f8cf4a5 authored 作者: Travis Cross's avatar Travis Cross

Fix memory leak in subscription handling

We were leaking one event (~539 bytes) for every subscribe packet
received with both an "event: as-feature-event" and an authorization
header.
上级 06b6e6bd
......@@ -3735,6 +3735,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
auth_res = sofia_reg_parse_auth(profile, authorization, sip, de,
(char *) sip->sip_request->rq_method_name, key, sizeof(key), network_ip, network_port, &v_event, 0,
REG_REGISTER, to_user, NULL, NULL, NULL);
if (v_event) switch_event_destroy(&v_event);
} else if ( sofia_reg_handle_register(nua, profile, nh, sip, de, REG_REGISTER, key, sizeof(key), &v_event, NULL, NULL, NULL)) {
if (v_event) {
switch_event_destroy(&v_event);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论