diff --git a/reactos/drivers/bus/serenum/detect.c b/reactos/drivers/bus/serenum/detect.c index a2813c24551..06dff739db4 100644 --- a/reactos/drivers/bus/serenum/detect.c +++ b/reactos/drivers/bus/serenum/detect.c @@ -193,6 +193,7 @@ ReportDetectedDevice( ByeBye: if (Pdo) { + ASSERT(PdoDeviceExtension); if (PdoDeviceExtension->DeviceDescription.Buffer) RtlFreeUnicodeString(&PdoDeviceExtension->DeviceDescription); if (PdoDeviceExtension->DeviceId.Buffer) diff --git a/reactos/drivers/bus/serenum/fdo.c b/reactos/drivers/bus/serenum/fdo.c index b0631227264..03464e1fc9e 100644 --- a/reactos/drivers/bus/serenum/fdo.c +++ b/reactos/drivers/bus/serenum/fdo.c @@ -124,9 +124,10 @@ SerenumFdoQueryBusRelations( } NumPDO = (DeviceExtension->AttachedPdo != NULL ? 1 : 0); - DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePool( + DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePoolWithTag( PagedPool, - sizeof(DEVICE_RELATIONS) + sizeof(PDEVICE_OBJECT) * (NumPDO - 1)); + sizeof(DEVICE_RELATIONS) + sizeof(PDEVICE_OBJECT) * (NumPDO - 1), + SERENUM_TAG); if (!DeviceRelations) return STATUS_INSUFFICIENT_RESOURCES; diff --git a/reactos/drivers/bus/serenum/misc.c b/reactos/drivers/bus/serenum/misc.c index 7528ac1b61a..58642fd1459 100644 --- a/reactos/drivers/bus/serenum/misc.c +++ b/reactos/drivers/bus/serenum/misc.c @@ -25,7 +25,7 @@ SerenumDuplicateUnicodeString( return STATUS_SUCCESS; } - Destination->Buffer = ExAllocatePool(PoolType, Source->MaximumLength); + Destination->Buffer = ExAllocatePoolWithTag(PoolType, Source->MaximumLength, SERENUM_TAG); if (Destination->Buffer == NULL) { return STATUS_INSUFFICIENT_RESOURCES; diff --git a/reactos/drivers/bus/serenum/pdo.c b/reactos/drivers/bus/serenum/pdo.c index d4d76b39126..8bc11c699cf 100644 --- a/reactos/drivers/bus/serenum/pdo.c +++ b/reactos/drivers/bus/serenum/pdo.c @@ -233,7 +233,7 @@ SerenumPdoPnp( DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n"); Source = &((PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->DeviceDescription; - Description = ExAllocatePool(PagedPool, Source->Length + sizeof(WCHAR)); + Description = ExAllocatePoolWithTag(PagedPool, Source->Length + sizeof(WCHAR), SERENUM_TAG); if (!Description) Status = STATUS_INSUFFICIENT_RESOURCES; else @@ -277,7 +277,7 @@ SerenumPdoPnp( PPNP_BUS_INFORMATION BusInfo; DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION\n"); - BusInfo = (PPNP_BUS_INFORMATION)ExAllocatePool(PagedPool, sizeof(PNP_BUS_INFORMATION)); + BusInfo = (PPNP_BUS_INFORMATION)ExAllocatePoolWithTag(PagedPool, sizeof(PNP_BUS_INFORMATION), SERENUM_TAG); if (!BusInfo) Status = STATUS_INSUFFICIENT_RESOURCES; else diff --git a/reactos/drivers/bus/serenum/serenum.h b/reactos/drivers/bus/serenum/serenum.h index 010652c5506..5a4af7ea88d 100644 --- a/reactos/drivers/bus/serenum/serenum.h +++ b/reactos/drivers/bus/serenum/serenum.h @@ -17,7 +17,7 @@ #define STDCALL #define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint - #define CHECKPOINT1 DbgPrint("(%s:%d)\n") + #define CHECKPOINT1 DbgPrint("(%s:%d)\n", __FILE__, __LINE__) #define DPRINT DPRINT1 #define CHECKPOINT CHECKPOINT1 #else