Skip to content

Commit bc6cf36

Browse files
jhovoldgregkh
authored andcommitted
serdev: fix memleak on module unload
Make sure to free all resources associated with the ida on module exit. Fixes: cd6484e ("serdev: Introduce new bus for serial attached devices") Cc: stable <stable@vger.kernel.org> # 4.11 Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 20dcff4 commit bc6cf36

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/tty/serdev/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ EXPORT_SYMBOL_GPL(__serdev_device_driver_register);
617617
static void __exit serdev_exit(void)
618618
{
619619
bus_unregister(&serdev_bus_type);
620+
ida_destroy(&ctrl_ida);
620621
}
621622
module_exit(serdev_exit);
622623

0 commit comments

Comments
 (0)