From 2302bc62ea28b88355ae6eb673eea2d814d082c8 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 25 Aug 2021 17:43:17 +0800 Subject: [PATCH] [TD-6167] process stmt is null in stmt_close --- src/client/src/tscPrepare.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/src/tscPrepare.c b/src/client/src/tscPrepare.c index 030022b0fd..1ccdef1ced 100644 --- a/src/client/src/tscPrepare.c +++ b/src/client/src/tscPrepare.c @@ -1781,6 +1781,9 @@ int taos_stmt_set_tbname(TAOS_STMT* stmt, const char* name) { int taos_stmt_close(TAOS_STMT* stmt) { STscStmt* pStmt = (STscStmt*)stmt; + if (pStmt == NULL){ + STMT_RET(TSDB_CODE_SUCCESS); + } if (!pStmt->isInsert) { SNormalStmt* normal = &pStmt->normal; if (normal->params != NULL) { -- GitLab