]> git.karo-electronics.de Git - karo-tx-linux.git/commit
UBIFS: fix memory leak on error path
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 31 May 2011 05:40:40 +0000 (08:40 +0300)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 17 May 2012 15:20:42 +0000 (11:20 -0400)
commitca77a2e55e6b1226a70d1e983fc8488d4a99d68e
treea97a8efef70c22bafa834c6006cb9965a81f0788
parent95fdbf513750aaf81c6ce6a9f4708215d050050f
UBIFS: fix memory leak on error path

commit 812eb258311f89bcd664a34a620f249d54a2cd83 upstream.

UBIFS leaks memory on error path in 'ubifs_jnl_update()' in case of write
failure because it forgets to free the 'struct ubifs_dent_node *dent' object.
Although the object is small, the alignment can make it large - e.g., 2KiB
if the min. I/O unit is 2KiB.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/ubifs/journal.c