omfs: fix memory leak
authorDavidlohr Bueso <dave.bueso@gmail.com>
Tue, 6 Jul 2010 04:50:58 +0000 (00:50 -0400)
committerBob Copeland <me@bobcopeland.com>
Tue, 6 Jul 2010 15:05:31 +0000 (11:05 -0400)
In the error path of omfs_fill_super(), the FS super block info
(sbi) is not being freed.  Correct this.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
fs/omfs/inode.c

index 089839a..b5d6380 100644 (file)
@@ -529,6 +529,8 @@ out_brelse_bh2:
 out_brelse_bh:
        brelse(bh);
 end:
+       if (ret)
+               kfree(sbi);
        return ret;
 }