Enable optimized builds
Fix segfault upon alloc failure
Check ret status of usb config get call