]> git.baikalelectronics.ru Git - 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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 10 May 2021 17:02:55 +0000 (19:02 +0200)
commit50315201f684733d98ca52eb26eb829a72c72a98
tree52cc3d1b2944a2fd5d2f1b54f26c1a3710a18c15
parent9fb51bb203ba1c67f480638e9d0605db59810687
ACPI: scan: Fix a memory leak in an error handling path

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

Fixes: 44b709324b3b ("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>
drivers/acpi/scan.c