Module: wine Branch: master Commit: eebb1d99318b8e165ff73647097251b5c4586861 URL: https://source.winehq.org/git/wine.git/?a=commit;h=eebb1d99318b8e165ff736470...
Author: Zebediah Figura z.figura12@gmail.com Date: Wed Jun 5 09:22:13 2019 -0500
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
---
dlls/winebus.sys/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index 7207e14..b649bfb 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -149,7 +149,7 @@ static WCHAR *get_instance_id(DEVICE_OBJECT *device) DWORD len = strlenW(ext->busid) + strlenW(serial) + 64; WCHAR *dst;
- if ((dst = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + if ((dst = ExAllocatePool(PagedPool, len * sizeof(WCHAR)))) { if (ext->input == (WORD)-1) { @@ -176,7 +176,7 @@ static WCHAR *get_device_id(DEVICE_OBJECT *device) DWORD len = strlenW(ext->busid) + 34; WCHAR *dst;
- if ((dst = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + if ((dst = ExAllocatePool(PagedPool, len * sizeof(WCHAR)))) { 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; 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); dst[strlenW(dst) + 1] = 0; @@ -387,8 +387,7 @@ static NTSTATUS build_device_relations(DEVICE_RELATIONS **devices) struct pnp_device *ptr;
EnterCriticalSection(&device_list_cs); - *devices = HeapAlloc(GetProcessHeap(), 0, sizeof(DEVICE_RELATIONS) + - list_count(&pnp_devset) * sizeof (void *)); + *devices = ExAllocatePool(PagedPool, offsetof(DEVICE_RELATIONS, Objects[list_count(&pnp_devset)]));
if (!*devices) {