diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 0a97402bdb6538c28f555c015c79d1ff94dd5109..773506c5ae295e15afd04003fb83049ed1680e93 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -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; }