fix:memory leak
This commit is contained in:
parent
438b5a5214
commit
1319066e0e
|
@ -1990,6 +1990,8 @@ int32_t fltInitValFieldData(SFilterInfo *info) {
|
||||||
// todo refactor the convert
|
// todo refactor the convert
|
||||||
int32_t code = sclConvertValueToSclParam(var, &out, NULL);
|
int32_t code = sclConvertValueToSclParam(var, &out, NULL);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
colDataDestroy(out.columnData);
|
||||||
|
taosMemoryFree(out.columnData);
|
||||||
qError("convert value to type[%d] failed", type);
|
qError("convert value to type[%d] failed", type);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
@ -4678,10 +4680,10 @@ int32_t filterExecute(SFilterInfo *info, SSDataBlock *pSrc, SColumnInfoData **p,
|
||||||
code = scalarCalculate(info->sclCtx.node, pList, &output);
|
code = scalarCalculate(info->sclCtx.node, pList, &output);
|
||||||
taosArrayDestroy(pList);
|
taosArrayDestroy(pList);
|
||||||
|
|
||||||
FLT_ERR_RET(code);
|
|
||||||
|
|
||||||
*p = output.columnData;
|
*p = output.columnData;
|
||||||
|
|
||||||
|
FLT_ERR_RET(code);
|
||||||
|
|
||||||
if (output.numOfQualified == output.numOfRows) {
|
if (output.numOfQualified == output.numOfRows) {
|
||||||
*pResultStatus = FILTER_RESULT_ALL_QUALIFIED;
|
*pResultStatus = FILTER_RESULT_ALL_QUALIFIED;
|
||||||
} else if (output.numOfQualified == 0) {
|
} else if (output.numOfQualified == 0) {
|
||||||
|
|
|
@ -68,6 +68,7 @@ int varbinary_test() {
|
||||||
}
|
}
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
}
|
}
|
||||||
|
taos_free_result(pRes);
|
||||||
|
|
||||||
pRes = taos_query(taos, "insert into tb1 using stb tags (1, 'tb1_bin1', 'vart1') values (now, 'nchar1', 'varc1', 0.3)");
|
pRes = taos_query(taos, "insert into tb1 using stb tags (1, 'tb1_bin1', 'vart1') values (now, 'nchar1', 'varc1', 0.3)");
|
||||||
taos_free_result(pRes);
|
taos_free_result(pRes);
|
||||||
|
|
Loading…
Reference in New Issue