Florian Eckert
25054b2326
leds: ledtrig-tty: Free allocated ttyname buffer on deactivate
...
The ttyname buffer for the ledtrig_tty_data struct is allocated in the
sysfs ttyname_store() function. This buffer must be released on trigger
deactivation. This was missing and is thus a memory leak.
While we are at it, the TTY handler in the ledtrig_tty_data struct should
also be returned in case of the trigger deactivation call.
Cc: stable@vger.kernel.org
Fixes: fd4a641ac88f ("leds: trigger: implement a tty trigger")
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20231127081621.774866-1-fe@dev.tdt.de
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-13 11:28:43 +00:00
..
2023-11-01 11:28:35 +00:00
2023-11-01 11:29:00 +00:00
2023-11-09 13:47:52 -08:00
2023-11-01 11:28:33 +00:00
2023-12-13 11:28:43 +00:00
2023-12-13 11:28:41 +00:00
2021-09-27 16:09:42 +02:00
2023-08-17 11:25:03 +01:00
2023-08-18 08:43:11 +01:00
2023-11-02 14:53:19 -10:00
2023-05-25 12:16:33 +01:00
2023-11-01 11:28:35 +00:00
2020-09-26 21:56:42 +02:00
2023-11-01 11:28:35 +00:00
2023-08-17 13:28:25 +01:00
2021-02-19 22:15:10 +01:00
2023-07-28 10:02:32 +01:00
2023-11-01 11:29:01 +00:00
2023-08-18 16:47:21 +01:00
2023-01-30 08:03:37 +00:00
2023-01-30 08:03:38 +00:00
2023-05-25 12:16:22 +01:00
2023-05-25 12:16:22 +01:00
2023-05-25 12:31:18 +01:00
2023-06-08 18:11:14 +01:00
2023-11-01 11:28:35 +00:00
2019-05-21 10:50:45 +02:00
2019-05-21 11:28:39 +02:00
2023-07-28 10:02:32 +01:00
2023-11-01 11:28:26 +00:00
2023-11-01 11:28:35 +00:00
2023-11-01 11:28:35 +00:00
2022-02-09 13:00:45 +00:00
2023-11-01 11:28:28 +00:00
2021-05-28 11:38:54 +02:00
2023-11-01 11:29:24 +00:00
2019-06-19 17:09:55 +02:00
2023-07-28 09:26:21 +01:00
2019-06-19 17:09:55 +02:00
2023-07-28 10:02:32 +01:00
2023-05-25 12:16:22 +01:00
2023-05-25 12:16:22 +01:00
2023-05-25 12:16:22 +01:00
2023-05-25 12:16:22 +01:00
2023-11-01 11:28:35 +00:00
2023-05-25 12:16:22 +01:00
2023-11-01 11:29:02 +00:00
2023-11-01 11:28:31 +00:00
2021-05-30 23:03:48 +02:00
2022-04-19 16:27:05 +02:00
2023-05-25 12:16:22 +01:00
2023-11-01 11:28:42 +00:00
2020-07-22 14:42:06 +02:00
2023-05-25 12:16:22 +01:00
2023-11-01 11:29:03 +00:00
2023-11-01 11:29:26 +00:00
2023-08-17 13:28:25 +01:00
2023-08-17 13:28:25 +01:00
2023-08-17 13:28:25 +01:00
2019-06-19 17:09:55 +02:00
2023-05-25 12:16:22 +01:00
2021-08-03 23:49:31 +02:00
2023-12-13 11:28:41 +00:00
2022-10-22 11:55:03 +02:00
2020-09-26 21:56:43 +02:00
2023-11-01 11:28:35 +00:00
2019-05-30 11:26:32 -07:00
2021-05-28 11:39:00 +02:00
2023-11-01 11:28:35 +00:00
2023-11-01 11:28:35 +00:00
2019-06-19 17:09:55 +02:00
2020-12-30 19:37:13 +01:00
2023-11-01 11:28:35 +00:00
2023-07-28 11:58:04 +01:00
2015-11-03 08:59:13 +01:00
2023-11-01 11:28:55 +00:00
2023-05-25 12:16:22 +01:00
2023-08-15 18:30:07 +01:00
2023-07-28 10:02:32 +01:00
2023-07-28 10:02:32 +01:00
2023-11-01 11:28:35 +00:00
2023-11-01 11:28:50 +00:00
2023-11-01 11:28:35 +00:00
2023-11-01 11:28:35 +00:00
2023-11-01 11:29:15 +00:00
2023-07-28 10:02:32 +01:00
2020-12-30 19:37:14 +01:00
2023-12-13 11:28:30 +00:00
2023-11-01 11:28:35 +00:00
2023-12-13 11:28:26 +00:00
2023-12-13 11:28:41 +00:00
2023-07-28 10:02:32 +01:00
2023-07-28 10:02:32 +01:00
2019-12-21 20:10:02 +01:00
2023-11-01 11:29:16 +00:00
2023-11-01 11:28:35 +00:00
2023-11-01 11:28:35 +00:00
2019-06-19 17:09:55 +02:00
2023-01-30 08:03:35 +00:00
2023-12-13 11:28:41 +00:00
2020-09-30 19:15:33 +02:00
2023-08-18 11:42:54 +01:00