From 6ff57b22d472576cd2ba83d412325686e0921639 Mon Sep 17 00:00:00 2001 From: "pengrongkun94@qq.com" Date: Tue, 21 Jan 2025 11:08:39 +0800 Subject: [PATCH] fix review --- source/client/src/clientStmt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/client/src/clientStmt.c b/source/client/src/clientStmt.c index 0df5d89cd3..675ee8e27e 100644 --- a/source/client/src/clientStmt.c +++ b/source/client/src/clientStmt.c @@ -1836,7 +1836,6 @@ int stmtGetParam(TAOS_STMT* stmt, int idx, int* type, int* bytes) { STMT_ERRI_JRET(stmtFetchColFields(stmt, &nums, &pField)); if (idx >= nums) { tscError("idx %d is too big", idx); - taosMemoryFree(pField); STMT_ERRI_JRET(TSDB_CODE_INVALID_PARA); } @@ -1844,10 +1843,8 @@ int stmtGetParam(TAOS_STMT* stmt, int idx, int* type, int* bytes) { *bytes = pField[idx].bytes; _return: - if (pField) { - taosMemoryFree(pField); - } + taosMemoryFree(pField); pStmt->errCode = preCode; return code;