Hotfix/sangshuduo/td 3197 taosdemo coverity scan for master (#7013)
* [TD-3197]<fix>: taosdemo and taosdump coverity scan issues. * exit if read sample file failed. * fix converity scan issue. * fix coverity scan issue. * fix coverity scan memory leak. Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
parent
ea33ca91d3
commit
2d20b42588
|
@ -5920,14 +5920,15 @@ static int32_t prepareStbStmt(
|
|||
|
||||
if (-1 == prepareStbStmtBind(
|
||||
tagsArray, stbInfo, tagRand, -1, -1, false /* is tag */)) {
|
||||
free(tagsArray);
|
||||
tmfree(tagsValBuf);
|
||||
tmfree(tagsArray);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = taos_stmt_set_tbname_tags(stmt, tableName, (TAOS_BIND *)tagsArray);
|
||||
|
||||
tmfree(tagsValBuf);
|
||||
tmfree((char *)tagsArray);
|
||||
tmfree(tagsArray);
|
||||
} else {
|
||||
ret = taos_stmt_set_tbname(stmt, tableName);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue