diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index b0c2aa7407ac5e743e90c524ad801bd7cb5dbccb..3561a7f8ea1625fa833a915e6fb57ae1d5589649 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -1764,7 +1764,14 @@ int32_t nodesPartitionCond(SNode** pCondition, SNode** pPrimaryKeyCond, SNode** *pTagIndexCond = *pCondition; } if (NULL != pTagCond) { - *pTagCond = *pCondition; + SNode* pTempCond = *pCondition; + if (NULL != pTagIndexCond) { + pTempCond = nodesCloneNode(*pCondition); + if (NULL == pTempCond) { + return TSDB_CODE_OUT_OF_MEMORY; + } + } + *pTagCond = pTempCond; } break; case COND_TYPE_TAG: