mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-09 17:26:03 +00:00
FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_core.c
This commit is contained in:
parent
594203f9b1
commit
e7abf29f4f
@ -1307,11 +1307,7 @@ static void load_mime_types(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch_safe_free(line_buf);
|
switch_safe_free(line_buf);
|
||||||
|
fclose(fd);
|
||||||
if (fd) {
|
|
||||||
fclose(fd);
|
|
||||||
fd = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
@ -2649,6 +2645,7 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, void *
|
|||||||
|
|
||||||
if (!zstr(arg)) {
|
if (!zstr(arg)) {
|
||||||
tech = strdup(arg);
|
tech = strdup(arg);
|
||||||
|
switch_assert(tech);
|
||||||
|
|
||||||
if ((prof = strchr(tech, ':'))) {
|
if ((prof = strchr(tech, ':'))) {
|
||||||
*prof++ = '\0';
|
*prof++ = '\0';
|
||||||
@ -2656,10 +2653,9 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, void *
|
|||||||
|
|
||||||
if (!strcasecmp(tech, "flush")) {
|
if (!strcasecmp(tech, "flush")) {
|
||||||
flush++;
|
flush++;
|
||||||
tech = NULL;
|
|
||||||
|
|
||||||
if (prof) {
|
if (prof) {
|
||||||
tech = prof;
|
char *tech = prof;
|
||||||
if ((prof = strchr(tech, ':'))) {
|
if ((prof = strchr(tech, ':'))) {
|
||||||
*prof++ = '\0';
|
*prof++ = '\0';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user