diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 3a88d2e90692b79ca0075bcb24d44c809c8d5965..4b9191a91fbbc27e81297d6679b82962480d4658 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -492,7 +492,8 @@ int32_t insertPoints(TAOS* taos, TAOS_SML_DATA_POINT* points, int32_t numPoints) int32_t idx = TARRAY_ELEM_IDX(point->schema->tags, kv->schema); TAOS_BIND* bind = taosArrayGet(tagBinds, idx); bind->buffer_type = kv->type; - bind->length = (uintptr_t*)&kv->length; + bind->length = malloc(sizeof(uintptr_t*)); + *bind->length = kv->length; bind->buffer = kv->value; bind->is_null = NULL; } @@ -514,7 +515,8 @@ int32_t insertPoints(TAOS* taos, TAOS_SML_DATA_POINT* points, int32_t numPoints) int32_t idx = TARRAY_ELEM_IDX(point->schema->fields, kv->schema); TAOS_BIND* bind = taosArrayGet(colBinds, idx); bind->buffer_type = kv->type; - bind->length = (uintptr_t*)&kv->length; + bind->length = malloc(sizeof(uintptr_t*)); + *bind->length = kv->length; bind->buffer = kv->value; bind->is_null = NULL; }