In the Linux kernel, the following vulnerability has been resolved:
usb: xhci: Check for xhci->interrupters being allocated in xhcimemclearup()
If xhcimeminit() fails, it calls into xhcimemcleanup() to mop up the damage. If it fails early enough, before xhci->interrupters is allocated but after xhci->maxinterrupters has been set, which happens in most (all?) cases, things get uglier, as xhcimem_cleanup() unconditionally derefences xhci->interrupters. With prejudice.
Gate the interrupt freeing loop with a check on xhci->interrupters being non-NULL.
Found while debugging a DMA allocation issue that led the XHCI driver on this exact path.