mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-06 07:59:35 +00:00
[mod_say_pl] Fix potential memory leak in pl_say_ip()
This commit is contained in:
parent
4ab8936a0e
commit
9a491fb8f8
@ -65,7 +65,7 @@ SWITCH_MODULE_DEFINITION(mod_say_pl, mod_say_pl_load, NULL, NULL);
|
|||||||
if ((tstatus = \
|
if ((tstatus = \
|
||||||
pl_say_general_count(_sh, tmp, say_args)) \
|
pl_say_general_count(_sh, tmp, say_args)) \
|
||||||
!= SWITCH_STATUS_SUCCESS) { \
|
!= SWITCH_STATUS_SUCCESS) { \
|
||||||
return tstatus; \
|
switch_goto_status(tstatus, end); \
|
||||||
} \
|
} \
|
||||||
say_args->method = smeth; say_args->type = stype; \
|
say_args->method = smeth; say_args->type = stype; \
|
||||||
say_args->gender = sgen; \
|
say_args->gender = sgen; \
|
||||||
@ -206,6 +206,7 @@ static switch_status_t pl_say_time(switch_say_file_handle_t *sh, char *tosay, sw
|
|||||||
switch_time_exp_t tm, tm_now;
|
switch_time_exp_t tm, tm_now;
|
||||||
uint8_t say_date = 0, say_time = 0, say_year = 0, say_month = 0, say_dow = 0, say_day = 0, say_yesterday = 0, say_today = 0;
|
uint8_t say_date = 0, say_time = 0, say_year = 0, say_month = 0, say_dow = 0, say_day = 0, say_yesterday = 0, say_today = 0;
|
||||||
const char *tz = NULL;
|
const char *tz = NULL;
|
||||||
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
tz = switch_say_file_handle_get_variable(sh, "timezone");
|
tz = switch_say_file_handle_get_variable(sh, "timezone");
|
||||||
|
|
||||||
@ -304,7 +305,7 @@ static switch_status_t pl_say_time(switch_say_file_handle_t *sh, char *tosay, sw
|
|||||||
switch_say_file(sh, "time/t_sekund");
|
switch_say_file(sh, "time/t_sekund");
|
||||||
}
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
switch_goto_status(SWITCH_STATUS_SUCCESS, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((t = atol(tosay)) > 0) {
|
if ((t = atol(tosay)) > 0) {
|
||||||
@ -409,7 +410,8 @@ static switch_status_t pl_say_time(switch_say_file_handle_t *sh, char *tosay, sw
|
|||||||
/* switch_say_file(sh, "digits/t_minut");*/
|
/* switch_say_file(sh, "digits/t_minut");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
end:
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user