diff options
author | Catalin Marinas | 2013-05-15 16:49:35 +0000 |
---|---|---|
committer | Rafael J. Wysocki | 2013-05-15 21:42:24 +0200 |
commit | 7a26b53070f0099dfcfc9d499458de861c5c4859 (patch) | |
tree | 89bd2af1edb86fb2ad99662460ec42f98cbaa26f /Kconfig | |
parent | 0ab5bb64937d76c660c29813d8de0f4b47bf7550 (diff) |
ACPI / scan: Fix memory leak on acpi_scan_init_hotplug() error path
Following commit 6b772e8f9 (ACPI: Update PNPID match handling for
notify), the acpi_scan_init_hotplug() calls acpi_set_pnp_ids() which
allocates acpi_hardware_id and copies a few strings (kstrdup). If the
devices does not have hardware_id set, the function exits without
freeing the previously allocated ids (and kmemleak complains). This
patch calls simply changes 'return' on error to a 'goto out' which
calls acpi_free_pnp_ids().
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Toshi Kani <toshi.kani@hp.com>
Tested-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions