From 4c981d14e0a75c7072ab6e0913c735243c1c3ebf Mon Sep 17 00:00:00 2001 From: slzhou Date: Tue, 28 Sep 2021 21:44:58 -0400 Subject: [PATCH] fix stack-use-after-scope error of isNullColBind --- src/client/src/tscParseLineProtocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 1bad1c7240..8f1f218420 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -1002,6 +1002,7 @@ static int32_t applyChildTableFields(TAOS* taos, SSmlSTableSchema* sTableSchema, size_t rows = taosArrayGetSize(cTablePoints); SArray* rowsBind = taosArrayInit(rows, POINTER_BYTES); + int isNullColBind = TSDB_TRUE; for (int i = 0; i < rows; ++i) { TAOS_SML_DATA_POINT* point = taosArrayGetP(cTablePoints, i); @@ -1012,7 +1013,6 @@ static int32_t applyChildTableFields(TAOS* taos, SSmlSTableSchema* sTableSchema, return TSDB_CODE_TSC_OUT_OF_MEMORY; } - int isNullColBind = TSDB_TRUE; for (int j = 0; j < numCols; ++j) { TAOS_BIND* bind = colBinds + j; bind->is_null = &isNullColBind; -- GitLab