omfs: fix memory leak
Davidlohr Bueso [Tue, 6 Jul 2010 04:50:58 +0000 (00:50 -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;
 }