mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
prevent a segfault in mod_basic if someone calls basic from CLI w/ no args
This commit is contained in:
parent
e458fa2d5a
commit
6681176ce9
@ -319,6 +319,7 @@ SWITCH_STANDARD_APP(basic_function)
|
|||||||
|
|
||||||
if (zstr(file)) {
|
if (zstr(file)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "missing file\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "missing file\n");
|
||||||
|
goto DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!switch_is_file_path(file)) {
|
if (!switch_is_file_path(file)) {
|
||||||
@ -347,7 +348,8 @@ SWITCH_STANDARD_APP(basic_function)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mb_close(&bi);
|
mb_close(&bi);
|
||||||
|
|
||||||
|
DONE:
|
||||||
switch_safe_free(fdup);
|
switch_safe_free(fdup);
|
||||||
switch_safe_free(mydata);
|
switch_safe_free(mydata);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user