libefi: efipart_floppy() will should not pass acpi pointer if the HID test fails
The current efipart_floppy() implementation is leaking the acpi pointer.
This commit is contained in:
parent
6a49c4a2ea
commit
fd5358d60d
@ -181,7 +181,7 @@ efipart_inithandles(void)
|
||||
static ACPI_HID_DEVICE_PATH *
|
||||
efipart_floppy(EFI_DEVICE_PATH *node)
|
||||
{
|
||||
ACPI_HID_DEVICE_PATH *acpi = NULL;
|
||||
ACPI_HID_DEVICE_PATH *acpi;
|
||||
|
||||
if (DevicePathType(node) == ACPI_DEVICE_PATH &&
|
||||
DevicePathSubType(node) == ACPI_DP) {
|
||||
@ -192,7 +192,7 @@ efipart_floppy(EFI_DEVICE_PATH *node)
|
||||
return (acpi);
|
||||
}
|
||||
}
|
||||
return (acpi);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user