diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index b6ac6d31735065e2cb52f0b69c8b966372fcb586..68ba3cd0bd3fb9aef60477cd3084be1dee8f4f35 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1907,7 +1907,12 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows) pParentObj->res.code = pSql->res.code; } + assert(pParentObj->pSubs[pSupporter->index] == tres); + + pParentObj->pSubs[pSupporter->index] = 0; + taos_free_result(tres); taosTFree(pSupporter); + if (atomic_sub_fetch_32(&pState->numOfRemain, 1) > 0) { return; }