fix: coverity issues

CID: 400233
This commit is contained in:
Ganlin Zhao 2022-10-11 11:29:18 +08:00
parent 6e548a96f8
commit 5583ee42c0
1 changed files with 6 additions and 3 deletions

View File

@ -52,10 +52,13 @@ STSBuf* tsBufCreate(bool autoDelete, int32_t order) {
}
if (!autoDelete) {
taosRemoveFile(pTSBuf->path);
if (taosRemoveFile(pTSBuf->path) == NULL) {
taosMemoryFree(pTSBuf);
return NULL;
}
}
if (NULL == allocResForTSBuf(pTSBuf)) {
if (allocResForTSBuf(pTSBuf) == NULL) {
return NULL;
}