]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog: wdat_wdt: Fix ACPI table leak in probe function
authorHaotian Zhang <vulab@iscas.ac.cn>
Thu, 13 Nov 2025 02:30:32 +0000 (10:30 +0800)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 15 Nov 2025 14:28:10 +0000 (15:28 +0100)
commit25c0b472eab8379683d4eef681185c104bed8ffd
treea290accd3e4c1e3abe33e7a0d0fbbb300343e680
parente0c50cddbd942338cbd6029ddbbcef4268a30718
watchdog: wdat_wdt: Fix ACPI table leak in probe function

wdat_wdt_probe() calls acpi_get_table() to obtain the WDAT ACPI table but
never calls acpi_put_table() on any paths. This causes a permanent ACPI
table memory leak.

Add a single cleanup path which calls acpi_put_table() to ensure
the ACPI table is always released.

Fixes: 058dfc767008 ("ACPI / watchdog: Add support for WDAT hardware watchdog")
Suggested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/wdat_wdt.c