diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index caebc457b4..52a68943bd 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1120,7 +1120,7 @@ SSmlHandle *smlBuildSmlInfo(TAOS *taos) { info->maxTagKVs = taosArrayInit(8, sizeof(SSmlKv)); info->preLineColKV = taosArrayInit(8, sizeof(SSmlKv)); - if (NULL == info->pVgHash) { + if (NULL == info->pVgHash || NULL == info->childTables || NULL == info->superTables) { uError("create SSmlHandle failed"); goto cleanup; } @@ -1299,6 +1299,9 @@ int32_t smlClearForRerun(SSmlHandle *info) { oneSTable = (SSmlSTableMeta **)taosHashIterate(info->superTables, oneSTable); } + taosHashClear(info->childTables); + taosHashClear(info->superTables); + if (!info->dataFormat) { if (unlikely(info->lines != NULL)) { uError("SML:0x%" PRIx64 " info->lines != NULL", info->id);