Merge pull request #20103 from taosdata/fix/TD-22668
fix: coverity scan issues
This commit is contained in:
commit
d06dedd5cc
|
@ -864,6 +864,8 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer,
|
||||||
if (!existing) {
|
if (!existing) {
|
||||||
taosArrayPush(pOldConsumer->currentTopics, &addedTopic);
|
taosArrayPush(pOldConsumer->currentTopics, &addedTopic);
|
||||||
taosArraySort(pOldConsumer->currentTopics, taosArrayCompareString);
|
taosArraySort(pOldConsumer->currentTopics, taosArrayCompareString);
|
||||||
|
} else {
|
||||||
|
taosMemoryFree(addedTopic);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set status
|
// set status
|
||||||
|
|
|
@ -629,7 +629,7 @@ void mndDumpSdb() {
|
||||||
}
|
}
|
||||||
taosWriteFile(pFile, pCont, contLen);
|
taosWriteFile(pFile, pCont, contLen);
|
||||||
taosWriteFile(pFile, "\n", 1);
|
taosWriteFile(pFile, "\n", 1);
|
||||||
taosFsyncFile(pFile);
|
UNUSED(taosFsyncFile(pFile));
|
||||||
taosCloseFile(&pFile);
|
taosCloseFile(&pFile);
|
||||||
tjsonDelete(json);
|
tjsonDelete(json);
|
||||||
taosMemoryFree(pCont);
|
taosMemoryFree(pCont);
|
||||||
|
|
|
@ -722,8 +722,10 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
|
||||||
mInfo("trans:%d, used to create stream:%s", pTrans->id, createStreamReq.name);
|
mInfo("trans:%d, used to create stream:%s", pTrans->id, createStreamReq.name);
|
||||||
|
|
||||||
mndTransSetDbName(pTrans, createStreamReq.sourceDB, streamObj.targetDb);
|
mndTransSetDbName(pTrans, createStreamReq.sourceDB, streamObj.targetDb);
|
||||||
if (mndTrancCheckConflict(pMnode, pTrans) != 0) goto _OVER;
|
if (mndTrancCheckConflict(pMnode, pTrans) != 0) {
|
||||||
|
mndTransDrop(pTrans);
|
||||||
|
goto _OVER;
|
||||||
|
}
|
||||||
// create stb for stream
|
// create stb for stream
|
||||||
if (createStreamReq.createStb == STREAM_CREATE_STABLE_TRUE &&
|
if (createStreamReq.createStb == STREAM_CREATE_STABLE_TRUE &&
|
||||||
mndCreateStbForStream(pMnode, pTrans, &streamObj, pReq->info.conn.user) < 0) {
|
mndCreateStbForStream(pMnode, pTrans, &streamObj, pReq->info.conn.user) < 0) {
|
||||||
|
|
|
@ -706,7 +706,7 @@ int32_t metaGetTbTSchemaEx(SMeta *pMeta, tb_uid_t suid, tb_uid_t uid, int32_t sv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ASSERTS(sver > 0, __FILE__, __LINE__, "failed to get table schema version: %d", sver)) {
|
if (ASSERTS(sver > 0, "failed to get table schema version: %d", sver)) {
|
||||||
code = TSDB_CODE_NOT_FOUND;
|
code = TSDB_CODE_NOT_FOUND;
|
||||||
goto _exit;
|
goto _exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -813,7 +813,8 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow) {
|
||||||
if (!state->pBlockData) {
|
if (!state->pBlockData) {
|
||||||
state->pBlockData = &state->blockData;
|
state->pBlockData = &state->blockData;
|
||||||
|
|
||||||
tBlockDataCreate(&state->blockData);
|
code = tBlockDataCreate(&state->blockData);
|
||||||
|
if (code) goto _err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case SFSNEXTROW_BLOCKDATA:
|
case SFSNEXTROW_BLOCKDATA:
|
||||||
|
|
|
@ -31,7 +31,7 @@ void simLogSql(char *sql, bool useSharp) {
|
||||||
taosFprintfFile(pFile, "%s;\n", sql);
|
taosFprintfFile(pFile, "%s;\n", sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
taosFsyncFile(pFile);
|
UNUSED(taosFsyncFile(pFile));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue