fix invalid read

This commit is contained in:
Yihao Deng 2024-07-08 07:34:06 +00:00
parent 8cbe534f93
commit 982fed581d
1 changed files with 4 additions and 9 deletions

View File

@ -1536,15 +1536,10 @@ int32_t chkpLoadExtraInfo(char* pChkpIdDir, int64_t* chkpId, int64_t* processId)
pFile = taosOpenFile(pDst, TD_FILE_READ);
if (pFile == NULL) {
if (errno == ENOENT) {
// compatible with previous version
*processId = -1;
code = 0;
goto _EXIT;
} else {
code = TAOS_SYSTEM_ERROR(errno);
stError("failed to open file to load extra info, file:%s, reason:%s", pDst, tstrerror(code));
}
// compatible with previous version
*processId = -1;
code = 0;
stError("failed to open file to load extra info, file:%s, reason:%s", pDst, tstrerror(TAOS_SYSTEM_ERROR(errno)));
goto _EXIT;
}