diff --git a/src/benchData.c b/src/benchData.c index b94b05e0..0cf5f26d 100644 --- a/src/benchData.c +++ b/src/benchData.c @@ -297,6 +297,10 @@ static int generateSampleFromCsv(char *buffer, char* file, FILE* fp, int32_t len if (file != NULL && fp == NULL) { fp = fopen(file, "r"); + if (fp == NULL) { + errorPrint("open csv file failed. file=%s\n", file); + return -1; + } needClose = true; }