mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[USBPORT] Use ExFreePoolWithTag() instead ExFreePool() for TtExtension. Add debug info.
This commit is contained in:
parent
3bda39fcb8
commit
67138e7d54
2 changed files with 10 additions and 7 deletions
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "usbport.h"
|
#include "usbport.h"
|
||||||
|
|
||||||
#define NDEBUG
|
//#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
@ -1654,7 +1654,8 @@ USBPORT_RemoveDevice(IN PDEVICE_OBJECT FdoDevice,
|
||||||
FdoExtension->Bandwidth[ix] += TtExtension->MaxBandwidth;
|
FdoExtension->Bandwidth[ix] += TtExtension->MaxBandwidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(TtExtension);
|
DPRINT("USBPORT_RemoveDevice: ExFreePoolWithTag TtExtension - %p\n", TtExtension);
|
||||||
|
ExFreePoolWithTag(TtExtension, USB_PORT_TAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
KeReleaseSpinLock(&FdoExtension->TtSpinLock, OldIrql);
|
KeReleaseSpinLock(&FdoExtension->TtSpinLock, OldIrql);
|
||||||
|
|
|
@ -504,7 +504,7 @@ USBPORT_DeleteEndpoint(IN PDEVICE_OBJECT FdoDevice,
|
||||||
BOOLEAN Result;
|
BOOLEAN Result;
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
|
||||||
DPRINT("USBPORT_DeleteEndpoint: Endpoint - %p\n", Endpoint);
|
DPRINT1("USBPORT_DeleteEndpoint: Endpoint - %p\n", Endpoint);
|
||||||
|
|
||||||
FdoExtension = FdoDevice->DeviceExtension;
|
FdoExtension = FdoDevice->DeviceExtension;
|
||||||
|
|
||||||
|
@ -602,7 +602,7 @@ USBPORT_ClosePipe(IN PUSBPORT_DEVICE_HANDLE DeviceHandle,
|
||||||
BOOLEAN IsReady;
|
BOOLEAN IsReady;
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
|
||||||
DPRINT("USBPORT_ClosePipe \n");
|
DPRINT1("USBPORT_ClosePipe \n");
|
||||||
|
|
||||||
FdoExtension = FdoDevice->DeviceExtension;
|
FdoExtension = FdoDevice->DeviceExtension;
|
||||||
|
|
||||||
|
@ -679,6 +679,7 @@ USBPORT_ClosePipe(IN PUSBPORT_DEVICE_HANDLE DeviceHandle,
|
||||||
KeAcquireSpinLock(&FdoExtension->TtSpinLock, &OldIrql);
|
KeAcquireSpinLock(&FdoExtension->TtSpinLock, &OldIrql);
|
||||||
|
|
||||||
TtExtension = Endpoint->TtExtension;
|
TtExtension = Endpoint->TtExtension;
|
||||||
|
DPRINT1("USBPORT_ClosePipe: TtExtension - %p\n", TtExtension);
|
||||||
|
|
||||||
if (TtExtension)
|
if (TtExtension)
|
||||||
{
|
{
|
||||||
|
@ -698,7 +699,8 @@ USBPORT_ClosePipe(IN PUSBPORT_DEVICE_HANDLE DeviceHandle,
|
||||||
FdoExtension->Bandwidth[ix] += TtExtension->MaxBandwidth;
|
FdoExtension->Bandwidth[ix] += TtExtension->MaxBandwidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(TtExtension);
|
DPRINT1("USBPORT_ClosePipe: ExFreePoolWithTag TtExtension - %p\n", TtExtension);
|
||||||
|
ExFreePoolWithTag(TtExtension, USB_PORT_TAG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -785,7 +787,7 @@ USBPORT_OpenPipe(IN PDEVICE_OBJECT FdoDevice,
|
||||||
USHORT AdditionalTransaction;
|
USHORT AdditionalTransaction;
|
||||||
BOOLEAN IsAllocatedBandwidth;
|
BOOLEAN IsAllocatedBandwidth;
|
||||||
|
|
||||||
DPRINT("USBPORT_OpenPipe: DeviceHandle - %p, FdoDevice - %p, PipeHandle - %p\n",
|
DPRINT1("USBPORT_OpenPipe: DeviceHandle - %p, FdoDevice - %p, PipeHandle - %p\n",
|
||||||
DeviceHandle,
|
DeviceHandle,
|
||||||
FdoDevice,
|
FdoDevice,
|
||||||
PipeHandle);
|
PipeHandle);
|
||||||
|
@ -1172,7 +1174,7 @@ USBPORT_ReopenPipe(IN PDEVICE_OBJECT FdoDevice,
|
||||||
KIRQL MiniportOldIrql;
|
KIRQL MiniportOldIrql;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("USBPORT_ReopenPipe ... \n");
|
DPRINT1("USBPORT_ReopenPipe ... \n");
|
||||||
|
|
||||||
FdoExtension = FdoDevice->DeviceExtension;
|
FdoExtension = FdoDevice->DeviceExtension;
|
||||||
Packet = &FdoExtension->MiniPortInterface->Packet;
|
Packet = &FdoExtension->MiniPortInterface->Packet;
|
||||||
|
|
Loading…
Reference in a new issue