fix: coverity scan problem
This commit is contained in:
parent
67ed0cf313
commit
446e8c5d6d
|
@ -668,6 +668,11 @@ static int metaAlterTableColumn(SMeta *pMeta, int64_t version, SVAlterTbReq *pAl
|
|||
SSchemaWrapper *pSchema;
|
||||
int c;
|
||||
|
||||
if (pAlterTbReq->colName == NULL) {
|
||||
terrno = TSDB_CODE_INVALID_MSG;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// search name index
|
||||
ret = tdbTbGet(pMeta->pNameIdx, pAlterTbReq->tbName, strlen(pAlterTbReq->tbName) + 1, &pVal, &nVal);
|
||||
if (ret < 0) {
|
||||
|
|
|
@ -1054,6 +1054,7 @@ static int32_t tsdbEndCommit(SCommitter *pCommitter, int32_t eno) {
|
|||
_exit:
|
||||
tsdbFSDestroy(&pCommitter->fs);
|
||||
taosArrayDestroy(pCommitter->aTbDataP);
|
||||
pCommitter->aTbDataP = NULL;
|
||||
if (code || eno) {
|
||||
tsdbError("vgId:%d %s failed at line %d since %s", TD_VID(pTsdb->pVnode), __func__, lino, tstrerror(code));
|
||||
} else {
|
||||
|
|
|
@ -149,6 +149,7 @@ _exit:
|
|||
void tsdbFSDestroy(STsdbFS *pFS) {
|
||||
if (pFS->pDelFile) {
|
||||
taosMemoryFree(pFS->pDelFile);
|
||||
pFS->pDelFile = NULL;
|
||||
}
|
||||
|
||||
for (int32_t iSet = 0; iSet < taosArrayGetSize(pFS->aDFileSet); iSet++) {
|
||||
|
@ -162,6 +163,7 @@ void tsdbFSDestroy(STsdbFS *pFS) {
|
|||
}
|
||||
|
||||
taosArrayDestroy(pFS->aDFileSet);
|
||||
pFS->aDFileSet = NULL;
|
||||
}
|
||||
|
||||
static int32_t tsdbScanAndTryFixFS(STsdb *pTsdb) {
|
||||
|
@ -296,7 +298,7 @@ static int32_t tsdbLoadFSFromFile(const char *fname, STsdbFS *pFS) {
|
|||
// load binary
|
||||
TdFilePtr pFD = taosOpenFile(fname, TD_FILE_READ);
|
||||
if (pFD == NULL) {
|
||||
code = terrno;
|
||||
code = TAOS_SYSTEM_ERROR(errno);
|
||||
TSDB_CHECK_CODE(code, lino, _exit);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ int32_t tsdbDoRetention(STsdb *pTsdb, int64_t now) {
|
|||
}
|
||||
|
||||
// do retention
|
||||
STsdbFS fs;
|
||||
STsdbFS fs = {0};
|
||||
|
||||
code = tsdbFSCopy(pTsdb, &fs);
|
||||
if (code) goto _err;
|
||||
|
|
Loading…
Reference in New Issue