未验证 提交 2d20b425 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

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: NShuduo Sang <sdsang@taosdata.com>
上级 ea33ca91
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册