Skip to content

Commit

Permalink
fix: csv file check null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Jun 5, 2024
1 parent 47db1ed commit 1fd9f66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/benchData.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1fd9f66

Please sign in to comment.