From e384c42a9d2907f7f0ed94bc0ac9e394d1704991 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Wed, 31 Mar 2021 09:55:19 +0800 Subject: [PATCH] fix bug --- src/client/src/tscUtil.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 858be75911..76835552b1 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -1945,7 +1945,9 @@ void tscVgroupTableCopy(SVgroupTableInfo* info, SVgroupTableInfo* pInfo) { info->vgInfo.epAddr[j].fqdn = strdup(pInfo->vgInfo.epAddr[j].fqdn); } - info->itemList = taosArrayDup(pInfo->itemList); + if (pInfo->itemList) { + info->itemList = taosArrayDup(pInfo->itemList); + } } SArray* tscVgroupTableInfoDup(SArray* pVgroupTables) { @@ -2187,8 +2189,10 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, __async_cb_func_t pnCmd->tagData.data = NULL; pnCmd->tagData.dataLen = 0; - pnCmd->pUdfInfo = taosArrayDup(pCmd->pUdfInfo); - + if (pCmd->pUdfInfo) { + pnCmd->pUdfInfo = taosArrayDup(pCmd->pUdfInfo); + } + if (tscAddSubqueryInfo(pnCmd) != TSDB_CODE_SUCCESS) { terrno = TSDB_CODE_TSC_OUT_OF_MEMORY; goto _error; -- GitLab