Date: Mon, 25 Sep 2017 19:49:57 +0000 (UTC) From: Toomas Soome <tsoome@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323991 - head/sys/boot/efi/libefi Message-ID: <201709251949.v8PJnvEK022672@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tsoome Date: Mon Sep 25 19:49:56 2017 New Revision: 323991 URL: https://svnweb.freebsd.org/changeset/base/323991 Log: libefi: efipart_floppy() will should not pass acpi pointer if the HID test fails The current efipart_floppy() implementation is leaking the acpi pointer. Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Mon Sep 25 19:33:32 2017 (r323990) +++ head/sys/boot/efi/libefi/efipart.c Mon Sep 25 19:49:56 2017 (r323991) @@ -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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709251949.v8PJnvEK022672>