From 9e3b159d5c4448458ea16389948126f4f8021083 Mon Sep 17 00:00:00 2001 From: xiongchangwu Date: Tue, 12 Nov 2024 23:04:59 +0800 Subject: [PATCH] lock ioService Signed-off-by: xiongchangwu --- adapter/uhdf2/host/src/device_service_stub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adapter/uhdf2/host/src/device_service_stub.c b/adapter/uhdf2/host/src/device_service_stub.c index 572a6336c..07e73631c 100644 --- a/adapter/uhdf2/host/src/device_service_stub.c +++ b/adapter/uhdf2/host/src/device_service_stub.c @@ -27,13 +27,12 @@ int DeviceServiceStubDispatch( struct HdfRemoteService *stub, int code, struct HdfSBuf *data, struct HdfSBuf *reply) { struct DeviceServiceStub *service = (struct DeviceServiceStub *)stub; - struct IDeviceIoService *ioService = service->super.deviceObject.service; int ret = HDF_FAILURE; #ifdef __USER__ pthread_rwlock_rdlock(&service->super.deviceObject.mutex); #endif - + struct IDeviceIoService *ioService = service->super.deviceObject.service; if (ioService == NULL) { #ifdef __USER__ pthread_rwlock_unlock(&service->super.deviceObject.mutex); -- Gitee