]> git.baikalelectronics.ru Git - kernel.git/commit
auxdisplay: lcd2s: Fix memory leak in ->remove()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 23 Feb 2022 15:47:17 +0000 (17:47 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 2 Mar 2022 23:30:14 +0000 (00:30 +0100)
commitef1e7af3abd2cb4db6717a96567f54670132c264
treeb21a03db01dee66b3ab9d25d70ee418a41afaa15
parentbcb0b7b0565ce1c98f68bdc17052645a649b5387
auxdisplay: lcd2s: Fix memory leak in ->remove()

Once allocated the struct lcd2s_data is never freed.
Fix the memory leak by switching to devm_kzalloc().

Fixes: 660c546809c3 ("auxdisplay: add a driver for lcd2s character display")
Cc: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
drivers/auxdisplay/lcd2s.c