提交 e7abf29f authored 作者: Andrey Volk's avatar Andrey Volk

FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_core.c

上级 594203f9
......@@ -1307,11 +1307,7 @@ static void load_mime_types(void)
}
switch_safe_free(line_buf);
if (fd) {
fclose(fd);
fd = NULL;
}
fclose(fd);
end:
......@@ -2649,6 +2645,7 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, void *
if (!zstr(arg)) {
tech = strdup(arg);
switch_assert(tech);
if ((prof = strchr(tech, ':'))) {
*prof++ = '\0';
......@@ -2656,10 +2653,9 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, void *
if (!strcasecmp(tech, "flush")) {
flush++;
tech = NULL;
if (prof) {
tech = prof;
char *tech = prof;
if ((prof = strchr(tech, ':'))) {
*prof++ = '\0';
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论