Commit 4630bcaf authored by Brian Gerst's avatar Brian Gerst Committed by Linus Torvalds

[PATCH] correction to super_block cleanups

I forgot to zero out the newly allocated memory in the previous patches
for ext2 and ncpfs.
parent f0f23f09
...@@ -469,6 +469,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ...@@ -469,6 +469,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
if (!sbi) if (!sbi)
return -ENOMEM; return -ENOMEM;
sb->u.generic_sbp = sbi; sb->u.generic_sbp = sbi;
memset(sbi, 0, sizeof(struct ext2_super_block));
/* /*
* See what the current blocksize for the device is, and * See what the current blocksize for the device is, and
......
...@@ -319,6 +319,8 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent) ...@@ -319,6 +319,8 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
if (!server) if (!server)
return -ENOMEM; return -ENOMEM;
sb->u.generic_sbp = server; sb->u.generic_sbp = server;
memset(server, 0, sizeof(struct ncp_server));
error = -EFAULT; error = -EFAULT;
if (raw_data == NULL) if (raw_data == NULL)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment