UBIFS: fix memory leak on error path
commit344bfe4456acedc5087677dd84b5a1aaa3137f8b
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 31 May 2011 05:40:40 +0000 (31 08:40 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:32 +0000 (23 15:05 -0700)
treee728fd14f8f031030bf1395fac6adbab877dd375
parent103b2f0904c37b7dfe919489d268e5090a4a6a89
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: Greg Kroah-Hartman <gregkh@suse.de>
fs/ubifs/journal.c