ACPI / dock: Do not leak memory on falilures to add a dock station
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 30 Jun 2013 21:50:24 +0000 (23:50 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 14 Jul 2013 23:33:11 +0000 (01:33 +0200)
The function creating and registering dock station objects,
dock_add(), leaks memory if there's an error after it's walked
the ACPI namespace calling find_dock_devices(), because it doesn't
free the list of dependent devices it's just created in those cases.

Fix that issue by adding the missing code to free the list of
dependent devices on errors.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

No differences found