mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:16:04 +00:00
- Handle memory allocation failure. Found by amine48rz
svn path=/trunk/; revision=42990
This commit is contained in:
parent
5a6e6bdf2a
commit
95776aba48
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ mouse_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
|
|||
pdriver->driver_desc.dev_protocol = 2; // Protocol Info.
|
||||
|
||||
pdriver->driver_ext = usb_alloc_mem(NonPagedPool, sizeof(MOUSE_DRVR_EXTENSION));
|
||||
if (!pdriver->driver_ext)
|
||||
{
|
||||
usb_dbg_print(DBGLVL_MAXIMUM, ("mouse_driver_init(): memory allocation failed!\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pdriver->driver_ext_size = sizeof(MOUSE_DRVR_EXTENSION);
|
||||
|
||||
RtlZeroMemory(pdriver->driver_ext, sizeof(MOUSE_DRVR_EXTENSION));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue