summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-03-02 20:37:58 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2023-03-02 20:37:58 +0300
commit6972633c58fd13c02dcaabcb6be380a98feda9fa (patch)
tree81489f8e2d6c94bb700e859d21fa2ff704fc66f7 /drivers
parent7c2bc4ed278ee0ffc0a1a37aaf7f39f1bfe8da4d (diff)
parentddf75a86aba2cfb7ec4497e8692b60c8c8fe0ee7 (diff)
downloadlinux-6972633c58fd13c02dcaabcb6be380a98feda9fa.tar.xz
Merge tag 'auxdisplay-6.3' of https://github.com/ojeda/linux
Pull auxdisplay fix from Miguel Ojeda: - hd44780: Fix potential memory leak in hd44780_remove() (Jianglei Nie) * tag 'auxdisplay-6.3' of https://github.com/ojeda/linux: auxdisplay: hd44780: Fix potential memory leak in hd44780_remove()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/auxdisplay/hd44780.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 8b2a0eb3f32a..d56a5d508ccd 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -322,8 +322,10 @@ fail1:
static int hd44780_remove(struct platform_device *pdev)
{
struct charlcd *lcd = platform_get_drvdata(pdev);
+ struct hd44780_common *hdc = lcd->drvdata;
charlcd_unregister(lcd);
+ kfree(hdc->hd44780);
kfree(lcd->drvdata);
kfree(lcd);