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 <[email protected]>
Acked-by: Darrick J. Wong <[email protected]>
Signed-off-by: Len Brown <[email protected]>
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)
return res;
error:
- remove_domain_devices(resource);
remove_attrs(resource);
return res;
}