diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index a9760b90a..7b5072d48 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -1565,6 +1565,9 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s) { Stream_Read_UINT32(s, deviceId); Stream_Read_UINT32(s, status); + + if (status != 0) + devman_unregister_device(rdpdr->devman, (void*)((size_t)deviceId)); error = CHANNEL_RC_OK; }