Skip to content
Commit 23dcd749 authored by Hans de Goede's avatar Hans de Goede
Browse files

platform/x86: think-lmi: Move kfree(setting->possible_values) to tlmi_attr_setting_release()



We must not free the possible_values string before we have called
sysfs_remove_group(kobj, &tlmi_attr_group) otherwise there is a race
where a sysfs read of possible_values could reference the free-ed
memory.

Move the kfree(setting->possible_values) together with the free of the
actual tlmi_attr_setting struct to avoid this race.

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 0fdf10e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment