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 010eea0..5fc5a09 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);