提交 464490ea authored 作者: Chris Rienzo's avatar Chris Rienzo 提交者: Andrey Volk

FS-11785 [mod_conference] fix memory leak on realloc failure

                          fix dead assignments in conference_cdr
上级 c6990e7a
......@@ -300,6 +300,7 @@ switch_status_t conference_api_sub_syntax(char **syntax)
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't realloc\n");
switch_safe_free(p);
return SWITCH_STATUS_TERM;
}
}
......
......@@ -315,8 +315,6 @@ char *conference_cdr_rfc4579_render(conference_obj_t *conference, switch_event_t
switch_mutex_unlock(conference->member_mutex);
off1 = off2 = off3 = off4 = 0;
xml_text = switch_xml_toxml(xml, SWITCH_TRUE);
switch_xml_free(xml);
......@@ -741,7 +739,6 @@ void conference_cdr_render(conference_obj_t *conference)
wrote = write(fd, xml_text, (unsigned) strlen(xml_text));
wrote++;
close(fd);
fd = -1;
} else {
char ebuf[512] = { 0 };
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error writing [%s][%s]\n",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论