UBIFS: fix a memory leak on error path.
authorMatthieu CASTET <matthieu.castet@parrot.com>
Mon, 2 Aug 2010 09:36:06 +0000 (11:36 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 3 Aug 2010 05:58:09 +0000 (08:58 +0300)
In 'mount_ubifs()', in case of 'ubifs_leb_unmap()' falure,
free allocated resources.

Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
fs/ubifs/super.c

index 010eea0090367aa7b54ec1f7de6802dad0d0106d..5fc5a0988970d15507ef048a6199c5e0f7219d65 100644 (file)
@@ -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);