Author: janderwald
Date: Wed Jun 9 13:27:19 2010
New Revision: 47711
URL:
http://svn.reactos.org/svn/reactos?rev=47711&view=rev
Log:
[PORTCLS]
- Check if resource list has been allocated
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp [iso-8859-1] Wed Jun 9
13:27:19 2010
@@ -118,11 +118,22 @@
// Clean up
DPRINT("IRP_MN_REMOVE_DEVICE\n");
- DeviceExt->resources->Release();
- IoDeleteDevice(DeviceObject);
+ // sanity check
+ PC_ASSERT(DeviceExt);
+
+ // FIXME more cleanup */
+ if (DeviceExt->resources)
+ {
+ // free resource list */
+ DeviceExt->resources->Release();
+
+ // set to null
+ DeviceExt->resources = NULL;
+ }
// Forward request
Status = PcForwardIrpSynchronous(DeviceObject, Irp);
+
return PcCompleteIrp(DeviceObject, Irp, Status);
case IRP_MN_QUERY_INTERFACE: