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;