]> git.baikalelectronics.ru Git - kernel.git/commit
ppdev: fix memory leak
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 10 Nov 2016 22:11:59 +0000 (22:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2016 19:25:34 +0000 (20:25 +0100)
commit6ac5d045aa6c53eb31a35b230650896edfcbba85
tree911516ca1d0a07f183893ab4c0f29a3cf8827efc
parent5654ea558a4a70463573de29b10abc4d194f3144
ppdev: fix memory leak

The variable name was only released if parport_register_dev_model()
fails. Now that we are using the device-model the parport driver
will duplicate the name and use it. So we can release the variable
after the device has been registered with the parport.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/ppdev.c