From 6a7b8275014734366ca32c4752593c3795eb7bf3 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 6 Apr 2008 20:19:38 +0000 Subject: [PATCH] Forgot to use nothrow for the allocation of the interface descriptor. Thanks for pointing that out Stephan! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24845 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/usb/USBInterface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libs/usb/USBInterface.cpp b/src/libs/usb/USBInterface.cpp index 988d63cb56..d794584f21 100644 --- a/src/libs/usb/USBInterface.cpp +++ b/src/libs/usb/USBInterface.cpp @@ -9,8 +9,10 @@ #include #include -#include + +#include #include +#include BUSBInterface::BUSBInterface(BUSBConfiguration *config, uint32 index, int rawFD) @@ -160,7 +162,8 @@ BUSBInterface::CountAlternates() const usb_interface_descriptor * BUSBInterface::AlternateAt(uint32 alternateIndex) { - usb_interface_descriptor *descriptor = new usb_interface_descriptor; + usb_interface_descriptor *descriptor + = new(std::nothrow) usb_interface_descriptor; if (descriptor == NULL) return NULL;