summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorDarren Jenkins <darrenrjenkins@gmail.com>2010-01-12 23:37:07 +1100
committerLen Brown <len.brown@intel.com>2010-01-19 23:56:02 -0500
commit7f07a605a3929d2d94dcbad8ccb7d280958d21f9 (patch)
tree0324eb959c005a4ba31d24c7e986f2a984c28616 /drivers/acpi
parentc19bdb6126a5e1f43b4a4fc3c4b09c926667e5ef (diff)
downloadlinux-7f07a605a3929d2d94dcbad8ccb7d280958d21f9.tar.bz2
ACPI: power_meter: remove double kfree()
resource->domain_devices can be double kfree()'d in a couple of places. Fix this by setting num_domain_devices = 0 after the kfree(). Coverity CID: 13356, 13355, 13354 Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/power_meter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/power_meter.c b/drivers/acpi/power_meter.c
index ca75c36f754c..dc4ffadf8122 100644
--- a/drivers/acpi/power_meter.c
+++ b/drivers/acpi/power_meter.c
@@ -534,6 +534,7 @@ static void remove_domain_devices(struct acpi_power_meter_resource *resource)
kfree(resource->domain_devices);
kobject_put(resource->holders_dir);
+ resource->num_domain_devices = 0;
}
static int read_domain_devices(struct acpi_power_meter_resource *resource)
@@ -740,7 +741,6 @@ skip_unsafe_cap:
return res;
error:
- remove_domain_devices(resource);
remove_attrs(resource);
return res;
}