prevent a segfault in mod_basic if someone calls basic from CLI w/ no args

This commit is contained in:
Ken Rice 2014-04-01 08:57:15 -05:00
parent e458fa2d5a
commit 6681176ce9
1 changed files with 3 additions and 1 deletions

View File

@ -319,6 +319,7 @@ SWITCH_STANDARD_APP(basic_function)
if (zstr(file)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "missing file\n");
goto DONE;
}
if (!switch_is_file_path(file)) {
@ -347,7 +348,8 @@ SWITCH_STANDARD_APP(basic_function)
}
mb_close(&bi);
DONE:
switch_safe_free(fdup);
switch_safe_free(mydata);
}