winebus.sys: Allocate IRP return buffers from paged pool.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
533a426d14
commit
eebb1d9931
|
@ -149,7 +149,7 @@ static WCHAR *get_instance_id(DEVICE_OBJECT *device)
|
||||||
DWORD len = strlenW(ext->busid) + strlenW(serial) + 64;
|
DWORD len = strlenW(ext->busid) + strlenW(serial) + 64;
|
||||||
WCHAR *dst;
|
WCHAR *dst;
|
||||||
|
|
||||||
if ((dst = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
|
if ((dst = ExAllocatePool(PagedPool, len * sizeof(WCHAR))))
|
||||||
{
|
{
|
||||||
if (ext->input == (WORD)-1)
|
if (ext->input == (WORD)-1)
|
||||||
{
|
{
|
||||||
|
@ -176,7 +176,7 @@ static WCHAR *get_device_id(DEVICE_OBJECT *device)
|
||||||
DWORD len = strlenW(ext->busid) + 34;
|
DWORD len = strlenW(ext->busid) + 34;
|
||||||
WCHAR *dst;
|
WCHAR *dst;
|
||||||
|
|
||||||
if ((dst = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
|
if ((dst = ExAllocatePool(PagedPool, len * sizeof(WCHAR))))
|
||||||
{
|
{
|
||||||
if (ext->input == (WORD)-1)
|
if (ext->input == (WORD)-1)
|
||||||
{
|
{
|
||||||
|
@ -197,7 +197,7 @@ static WCHAR *get_compatible_ids(DEVICE_OBJECT *device)
|
||||||
struct device_extension *ext = (struct device_extension *)device->DeviceExtension;
|
struct device_extension *ext = (struct device_extension *)device->DeviceExtension;
|
||||||
WCHAR *dst;
|
WCHAR *dst;
|
||||||
|
|
||||||
if ((dst = HeapAlloc(GetProcessHeap(), 0, (strlenW(ext->busid) + 2) * sizeof(WCHAR))))
|
if ((dst = ExAllocatePool(PagedPool, (strlenW(ext->busid) + 2) * sizeof(WCHAR))))
|
||||||
{
|
{
|
||||||
strcpyW(dst, ext->busid);
|
strcpyW(dst, ext->busid);
|
||||||
dst[strlenW(dst) + 1] = 0;
|
dst[strlenW(dst) + 1] = 0;
|
||||||
|
@ -387,8 +387,7 @@ static NTSTATUS build_device_relations(DEVICE_RELATIONS **devices)
|
||||||
struct pnp_device *ptr;
|
struct pnp_device *ptr;
|
||||||
|
|
||||||
EnterCriticalSection(&device_list_cs);
|
EnterCriticalSection(&device_list_cs);
|
||||||
*devices = HeapAlloc(GetProcessHeap(), 0, sizeof(DEVICE_RELATIONS) +
|
*devices = ExAllocatePool(PagedPool, offsetof(DEVICE_RELATIONS, Objects[list_count(&pnp_devset)]));
|
||||||
list_count(&pnp_devset) * sizeof (void *));
|
|
||||||
|
|
||||||
if (!*devices)
|
if (!*devices)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue