[USBSTOR]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 1 Mar 2017 13:51:18 +0000 (13:51 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 1 Mar 2017 13:51:18 +0000 (13:51 +0000)
- Fix error check in USBSTOR_SelectConfigurationAndInterface. CID 515249

svn path=/trunk/; revision=74014

reactos/drivers/usb/usbstor/descriptor.c

index da15743..3df36a6 100644 (file)
@@ -422,14 +422,14 @@ USBSTOR_SelectConfigurationAndInterface(
     // backup interface information
     //
     DeviceExtension->InterfaceInformation = (PUSBD_INTERFACE_INFORMATION)AllocateItem(NonPagedPool, Urb->UrbSelectConfiguration.Interface.Length);
     // backup interface information
     //
     DeviceExtension->InterfaceInformation = (PUSBD_INTERFACE_INFORMATION)AllocateItem(NonPagedPool, Urb->UrbSelectConfiguration.Interface.Length);
-    if (!NT_SUCCESS(Status))
+    if (!DeviceExtension->InterfaceInformation)
     {
         //
         // failed to allocate interface information structure
         //
         FreeItem(InterfaceList);
         ExFreePoolWithTag(Urb, 0);
     {
         //
         // failed to allocate interface information structure
         //
         FreeItem(InterfaceList);
         ExFreePoolWithTag(Urb, 0);
-        return Status;
+        return STATUS_INSUFFICIENT_RESOURCES;
     }
 
     //
     }
 
     //