UBIFS memleak

Submitted by Matthieu CASTET on Aug. 2, 2010, 9:36 a.m.

Details

Message ID 4C569186.4080404@parrot.com
State New, archived
Headers show

Commit Message

Matthieu CASTET Aug. 2, 2010, 9:36 a.m.
In mount_ubifs, in case of ubifs_leb_unmap error, free allocated resources.


Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>

Comments

Artem Bityutskiy Aug. 3, 2010, 6 a.m.
On Mon, 2010-08-02 at 11:36 +0200, Matthieu CASTET wrote:
> In mount_ubifs, in case of ubifs_leb_unmap error, free allocated resources.
> 
> 
> Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>

Pushed, thanks.

Patch hide | download patch | download mbox

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 4d2f215..9362f16 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1318,7 +1318,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);