From 3f23495983061c6d25a1cdbacca6b3328fa64288 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 28 Mar 2022 16:46:21 +0800 Subject: [PATCH] fst query --- source/libs/index/src/index_fst_automation.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/source/libs/index/src/index_fst_automation.c b/source/libs/index/src/index_fst_automation.c index 32623b09b4..cf9d88b73e 100644 --- a/source/libs/index/src/index_fst_automation.c +++ b/source/libs/index/src/index_fst_automation.c @@ -164,15 +164,7 @@ AutomationCtx* automCtxCreate(void* data, AutomationType atype) { // add more search type } - char* dst = NULL; - if (data != NULL) { - char* src = (char*)data; - size_t len = strlen(src); - dst = (char*)taosMemoryCalloc(1, len * sizeof(char) + 1); - memcpy(dst, src, len); - } - - ctx->data = dst; + ctx->data = strdup((char*)data); ctx->type = atype; ctx->stdata = (void*)sv; return ctx; -- GitLab