fix a memory leak for null value projection in tags.

This commit is contained in:
hjxilinx 2020-02-01 23:13:54 +08:00
parent d80ec2aad8
commit 2735c95624
1 changed files with 2 additions and 1 deletions

View File

@ -4525,10 +4525,11 @@ static void doSetTagValueInParam(tTagSchema *pTagSchema, int32_t tagColIdx, SMet
SSchema *pCol = &pTagSchema->pSchema[tagColIdx];
tVariantDestroy(param);
tVariantCreateFromBinary(param, pStr, pCol->bytes, pCol->type);
if (isNull(pStr, pCol->type)) {
param->nType = TSDB_DATA_TYPE_NULL;
} else {
tVariantCreateFromBinary(param, pStr, pCol->bytes, pCol->type);
}
}