Skip to content

Commit 684f9d2

Browse files
authored
fix(udf): destory data block in the error case (#34140)
1 parent 552faab commit 684f9d2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

source/libs/function/src/tudf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2284,8 +2284,8 @@ int32_t doCallUdfScalarFunc(UdfcFuncHandle handle, SScalarParam *input, int32_t
22842284
int32_t err = callUdf(handle, callType, &inputBlock, NULL, NULL, &resultBlock, NULL);
22852285
if (err == 0) {
22862286
err = convertDataBlockToScalarParm(&resultBlock, output);
2287-
taosArrayDestroy(resultBlock.pDataBlock);
22882287
}
2288+
taosArrayDestroy(resultBlock.pDataBlock);
22892289

22902290
blockDataFreeRes(&inputBlock);
22912291
return err;

test/ci/cases.task

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,7 @@
468468
#,,y,.,./ci/pytest.sh pytest cases/12-UDFs/test_udf_py.py
469469
#,,y,.,./ci/pytest.sh pytest cases/12-UDFs/test_udf_with_const.py
470470
,,y,.,./ci/pytest.sh pytest cases/12-UDFs/test_udf_restart_taosd.py
471-
# Temporarily disable memory leak detection for UDF tests
472-
#,,y,.,./ci/pytest.sh pytest cases/12-UDFs/test_udf_test.py
471+
,,y,.,./ci/pytest.sh pytest cases/12-UDFs/test_udf_test.py
473472
,,n,.,pytest cases/12-UDFs/test_udf_test.py
474473
,,n,.,pytest cases/12-UDFs/test_udf_create.py
475474
,,n,.,pytest cases/12-UDFs/test_udf_cfg1.py

0 commit comments

Comments
 (0)