diff --git a/source/libs/function/src/tudf.c b/source/libs/function/src/tudf.c index 974bcda4d2021540c9478c4becaef03868f630bc..5d894783fbada48446406db1d60da8121d1a690d 100644 --- a/source/libs/function/src/tudf.c +++ b/source/libs/function/src/tudf.c @@ -1823,7 +1823,7 @@ int32_t doTeardownUdf(UdfcFuncHandle handle) { udfcRunUdfUvTask(task, UV_TASK_DISCONNECT); fnInfo("tear down udf. udf name: %s, udf func handle: %p", session->udfName, handle); - if (session->udfUvPipe->data != NULL) { + if (session->udfUvPipe != NULL && session->udfUvPipe->data != NULL) { SClientUvConn *conn = session->udfUvPipe->data; conn->session = NULL; }