[channel rdpdr] Clean up IRP on processing errors

This commit is contained in:
Armin Novak 2022-11-08 13:55:27 +01:00 committed by akallabeth
parent 1da0d63c78
commit 60d2e525f5
1 changed files with 8 additions and 2 deletions

View File

@ -1390,10 +1390,16 @@ static UINT rdpdr_process_irp(rdpdrPlugin* rdpdr, wStream* s)
return error;
}
IFCALLRET(irp->device->IRPRequest, error, irp->device, irp);
if (irp->device->IRPRequest)
IFCALLRET(irp->device->IRPRequest, error, irp->device, irp);
else
irp->Discard(irp);
if (error)
if (error != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "device->IRPRequest failed with error %" PRIu32 "", error);
irp->Discard(irp);
}
return error;
}