mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
After allocating Private via AllocateZeroPool and successfully opening both gEfiDevicePathProtocolGuid and gEfiPciIoProtocolGuid BY_DRIVER, the function attempts PciIo->Attributes(EfiPciIoAttributeOperationGet) If this call fails, the code executes return Status instead of goto Exit. Trigger path: NvmExpressDriverBindingStart is called. OpenProtocol for DevicePath succeeds (opens BY_DRIVER). OpenProtocol for PciIo succeeds (opens BY_DRIVER). AllocateZeroPool for Private succeeds. PciIo->Attributes(Get) returns an error. return Status bypasses the Exit: label. Consequence: Memory leak of NVME_CONTROLLER_PRIVATE_DATA. Two protocols remain opened BY_DRIVER on the controller handle, preventing other drivers from binding. Signed-off-by: Sean Brogan <sebrogan@microsoft.com> |
||
|---|---|---|
| .. | ||
| Application | ||
| Bus | ||
| Core | ||
| Include | ||
| Library | ||
| Logo | ||
| Test | ||
| Universal | ||
| MdeModulePkg.ci.yaml | ||
| MdeModulePkg.dec | ||
| MdeModulePkg.dsc | ||
| MdeModulePkg.uni | ||
| MdeModulePkgExtra.uni | ||