[TD_543] fix coverity scan, cid:267747

This commit is contained in:
Shengliang Guan 2020-06-08 09:09:34 +00:00
parent 894ad481f4
commit 9e221b8a53
1 changed files with 5 additions and 1 deletions

View File

@ -148,7 +148,11 @@ static void shellSourceFile(TAOS *con, char *fptr) {
}
char *fname = full_path.we_wordv[0];
if (fname == NULL) {
fprintf(stderr, "ERROR: invalid filename\n");
return;
}
if (access(fname, F_OK) != 0) {
fprintf(stderr, "ERROR: file %s is not exist\n", fptr);