Hotfix/sangshuduo/td 3197 taosdemo coverity scan for master (#7099)
* [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. * fix resource leak reported by coverity scan. Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
parent
310ef26829
commit
ede06b75aa
|
@ -6163,6 +6163,7 @@ static int32_t prepareStbStmt(
|
|||
if (0 != ret) {
|
||||
errorPrint("%s() LN%d, stmt_bind_param() failed! reason: %s\n",
|
||||
__func__, __LINE__, taos_stmt_errstr(stmt));
|
||||
free(bindArray);
|
||||
return -1;
|
||||
}
|
||||
// if msg > 3MB, break
|
||||
|
@ -6170,6 +6171,7 @@ static int32_t prepareStbStmt(
|
|||
if (0 != ret) {
|
||||
errorPrint("%s() LN%d, stmt_add_batch() failed! reason: %s\n",
|
||||
__func__, __LINE__, taos_stmt_errstr(stmt));
|
||||
free(bindArray);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue