From c18de72fb3c72fdc5ca883910761af3f14d90d76 Mon Sep 17 00:00:00 2001 From: Matthieu CASTET Date: Mon, 2 Aug 2010 11:36:06 +0200 Subject: UBIFS: fix a memory leak on error path. In 'mount_ubifs()', in case of 'ubifs_leb_unmap()' falure, free allocated resources. Signed-off-by: Matthieu CASTET Signed-off-by: Artem Bityutskiy --- fs/ubifs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ubifs/super.c') diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 010eea009036..5fc5a0988970 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1320,7 +1320,7 @@ static int mount_ubifs(struct ubifs_info *c) */ err = ubifs_leb_unmap(c, c->gc_lnum); if (err) - return err; + goto out_orphans; } err = dbg_check_lprops(c); -- cgit v1.2.3