fix: avoid invalid read/write
This commit is contained in:
parent
56f7b46ae7
commit
991b5c7b40
|
@ -70,6 +70,9 @@ static int metaSaveJsonVarToIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry, const
|
||||||
|
|
||||||
char * key = pTagVal->pKey;
|
char * key = pTagVal->pKey;
|
||||||
int32_t nKey = strlen(key);
|
int32_t nKey = strlen(key);
|
||||||
|
if (nKey == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
SIndexTerm *term = NULL;
|
SIndexTerm *term = NULL;
|
||||||
if (type == TSDB_DATA_TYPE_NULL) {
|
if (type == TSDB_DATA_TYPE_NULL) {
|
||||||
|
@ -98,7 +101,6 @@ static int metaSaveJsonVarToIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry, const
|
||||||
if (term != NULL) {
|
if (term != NULL) {
|
||||||
indexMultiTermAdd(terms, term);
|
indexMultiTermAdd(terms, term);
|
||||||
}
|
}
|
||||||
memset(key, 0, sizeof(key));
|
|
||||||
}
|
}
|
||||||
tIndexJsonPut(pMeta->pTagIvtIdx, terms, tuid);
|
tIndexJsonPut(pMeta->pTagIvtIdx, terms, tuid);
|
||||||
indexMultiTermDestroy(terms);
|
indexMultiTermDestroy(terms);
|
||||||
|
|
Loading…
Reference in New Issue