]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ACPI: scan: Fix a memory leak in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 8 May 2021 07:23:09 +0000 (09:23 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 18 Jun 2021 09:07:30 +0000 (11:07 +0200)
commitfd91c28990fe72ad88ef308a38625e865c5c6115
tree4b5145969877739a0a510974e41dab74036033b8
parent4a198628948778fd5813df344832e39e07c9ad10
ACPI: scan: Fix a memory leak in an error handling path

BugLink: https://bugs.launchpad.net/bugs/1931292
[ Upstream commit 0c8bd174f0fc131bc9dfab35cd8784f59045da87 ]

If 'acpi_device_set_name()' fails, we must free
'acpi_device_bus_id->bus_id' or there is a (potential) memory leak.

Fixes: eb50aaf960e3 ("ACPI: scan: Use unique number for instance_no")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/acpi/scan.c