summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gerst <bgerst@didntduck.org>2002-03-12 01:50:53 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-03-12 01:50:53 -0800
commit4630bcaf11c1da55ded9d1af12e8ddae879f2b12 (patch)
tree27410757539d7ce3985e0b59e4508b97860d3328
parentf0f23f09bdb11a7a145b48b54158bcd9a6c922da (diff)
[PATCH] correction to super_block cleanups
I forgot to zero out the newly allocated memory in the previous patches for ext2 and ncpfs.
-rw-r--r--fs/ext2/super.c1
-rw-r--r--fs/ncpfs/inode.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 872756bdcd22..c11c36040167 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -469,6 +469,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
if (!sbi)
return -ENOMEM;
sb->u.generic_sbp = sbi;
+ memset(sbi, 0, sizeof(struct ext2_super_block));
/*
* See what the current blocksize for the device is, and
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index fb535b54a070..0875bfe5bd8c 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -319,6 +319,8 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
if (!server)
return -ENOMEM;
sb->u.generic_sbp = server;
+ memset(server, 0, sizeof(struct ncp_server));
+
error = -EFAULT;
if (raw_data == NULL)
goto out;