]> git.karo-electronics.de Git - karo-tx-linux.git/commit
UBI: fix memory leak in update path
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 18 Jan 2010 14:43:44 +0000 (16:43 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:02:31 +0000 (15:02 -0800)
commitf6fbe0baa35fd65a4344a48ebc60c08f18a0fc20
treeb1e09ede8392e99853f4f8b62046ebb3e1380779
parent4d845d60ad3d385c43716c50fc7c87dd5d3466fe
UBI: fix memory leak in update path

commit ebddd63b74dcf1cb676d14328d5852f1fee19a8a upstream.

When truncating an UBI volume, UBI should allocates a PEB-sized
buffer but does not release it, which leads to memory leaks.
This patch fixes the issue.

Reported-by: Marek Skuczynski <mareksk7@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tested-by: Marek Skuczynski <mareksk7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/mtd/ubi/upd.c