]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: processor_driver: add missing kfree
authorJulia Lawall <Julia.Lawall@lip6.fr>
Thu, 15 Mar 2012 08:32:05 +0000 (09:32 +0100)
committerLen Brown <len.brown@intel.com>
Fri, 30 Mar 2012 07:30:34 +0000 (03:30 -0400)
commit58cd9bc49a859537da9cdbcbdd693d9eb53fca64
tree4cc2183ddf4ce79765bb6d02f3d6b9191f3bcbe5
parent2e2baa05575543735a01c5c26ef6151248fd6351
ACPI: processor_driver: add missing kfree

The function acpi_processor_add is stored in the ops.add field of a
acpi_driver structure.  This function is then called in
acpi_bus_driver_init.  On failure, this function clears the field
device->driver_data, but does not free its contents.  Thus the free has to
be done by the add function.  In acpi_processor_add, the corresponding
value is pr.  This value is currently freed on failure before storing it in
device->driver_data, but not after.  This free is added in the error
handling code at the end of the function.  The per_cpu variable
processors is also cleared so that it does not refer to a dangling pointer.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/processor_driver.c