serdev: fix memleak on module unload
Subsystems (3)
PATCH 1/1 serdev: fix memleak on module unload
Make sure to free all resources associated with the ida on module exit.
Fixes cd6484e1830b ("serdev: Introduce new bus for serial attached devices")
Cc stable <[email protected]> # 4.11
Signed-off-by Johan Hovold <[email protected]>
--- drivers/tty/serdev/core.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serdev/core.c +1 -0
@@ -617,6 +617,7 @@ EXPORT_SYMBOL_GPL(__serdev_device_driver_register); static void __exit serdev_exit(void) {bus_unregister (&serdev_bus_type); +ida_destroy (&ctrl_ida); }module_exit (serdev_exit);
Signature · 1 line
2.17.1