diff --git a/source/libs/scheduler/src/schRemote.c b/source/libs/scheduler/src/schRemote.c index 47de2528faad6d4872d39152355877b18caeeef8..7e2d3ccb80635b19fbe3f14ea8d3ddce4672d20f 100644 --- a/source/libs/scheduler/src/schRemote.c +++ b/source/libs/scheduler/src/schRemote.c @@ -185,12 +185,12 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa code = rsp->code; } } - SCH_UNLOCK(SCH_WRITE, &pJob->resLock); if (taosArrayGetSize((SArray*)pJob->execRes.res) <= 0) { taosArrayDestroy((SArray*)pJob->execRes.res); pJob->execRes.res = NULL; } + SCH_UNLOCK(SCH_WRITE, &pJob->resLock); } tDecoderClear(&coder);