Skip to content

Commit

Permalink
fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
Pengrongkun committed Jan 21, 2025
1 parent 3e90b67 commit 6ff57b2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions source/client/src/clientStmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1836,18 +1836,15 @@ 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);
}

*type = pField[idx].type;
*bytes = pField[idx].bytes;

_return:
if (pField) {
taosMemoryFree(pField);
}

taosMemoryFree(pField);
pStmt->errCode = preCode;

return code;
Expand Down

0 comments on commit 6ff57b2

Please sign in to comment.