diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 9055f77c8a8e188da8f47110e41f25d29bf6e9e1..ed3ebed7ae49281f68b9b68997a3484051563494 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -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); }