platform/x86: think-lmi: Fix memory leaks when parsing ThinkStation WMI strings
authorMark Pearson <mpearson-lenovo@squebb.ca>
Mon, 3 Apr 2023 01:31:19 +0000 (21:31 -0400)
committerHans de Goede <hdegoede@redhat.com>
Mon, 3 Apr 2023 09:36:23 +0000 (11:36 +0200)
commite7d796fccdc8d17c2d21817ebe4c7bf5bbfe5433
tree0f602a55dce8e7bb81b60a98a122a8702fd8fe8e
parenta3c4c053014585dcf20f4df954791b74d8a8afcd
platform/x86: think-lmi: Fix memory leaks when parsing ThinkStation WMI strings

My previous commit introduced a memory leak where the item allocated
from tlmi_setting was not freed.
This commit also renames it to avoid confusion with the similarly name
variable in the same function.

Fixes: 8a02d70679fc ("platform/x86: think-lmi: Add possible_values for ThinkStation")
Reported-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Link: https://lore.kernel.org/lkml/df26ff45-8933-f2b3-25f4-6ee51ccda7d8@gmx.de/T/
Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20230403013120.2105-1-mpearson-lenovo@squebb.ca
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Tested-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/think-lmi.c