[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180919234721.16042-1-tpiepho@impinj.com>
Date: Wed, 19 Sep 2018 23:47:59 +0000
From: Trent Piepho <tpiepho@...inj.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Trent Piepho <tpiepho@...inj.com>,
Russell King <linux@...linux.org.uk>,
Todd Kjos <tkjos@...gle.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH] ARM: amba: Fix leak of driver_override attribute value
If driver_override was set when a device was released the string would
not be kfree'ed in amba_device_release and thus leaked when the amba
device was freed.
Cc: Russell King <linux@...linux.org.uk>
Cc: Todd Kjos <tkjos@...gle.com>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Trent Piepho <tpiepho@...inj.com>
---
drivers/amba/bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 41b706403ef7..ff3cb96526bc 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -347,6 +347,7 @@ static void amba_device_release(struct device *dev)
if (d->res.parent)
release_resource(&d->res);
+ kfree(d->driver_override);
kfree(d);
}
--
2.14.4
Powered by blists - more mailing lists