diff options
author | Armin Wolf <W_Armin@gmx.de> | 2023-03-31 23:33:19 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-04-03 11:35:53 +0200 |
commit | a3c4c053014585dcf20f4df954791b74d8a8afcd (patch) | |
tree | 82bc7437bbf87af6eef5bf116430426ec5bd3f56 /scripts/gdb/linux/modules.py | |
parent | e3271a5917d1501089b1a224d702aa053e2877f4 (diff) |
platform/x86: think-lmi: Fix memory leak when showing current settings
When retriving a item string with tlmi_setting(), the result has to be
freed using kfree(). In current_value_show() however, malformed
item strings are not freed, causing a memory leak.
Fix this by eliminating the early return responsible for this.
Reported-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Link: https://lore.kernel.org/platform-driver-x86/01e920bc-5882-ba0c-dd15-868bf0eca0b8@alu.unizg.hr/T/#t
Tested-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Fixes: 0fdf10e5fc96 ("platform/x86: think-lmi: Split current_value to reflect only the value")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230331213319.41040-1-W_Armin@gmx.de
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions