]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] correction to super_block cleanups
authorBrian Gerst <bgerst@didntduck.org>
Tue, 12 Mar 2002 09:50:53 +0000 (01:50 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Tue, 12 Mar 2002 09:50:53 +0000 (01:50 -0800)
I forgot to zero out the newly allocated memory in the previous patches
for ext2 and ncpfs.

fs/ext2/super.c
fs/ncpfs/inode.c

index 872756bdcd2281484a4e2433d59d42b7395062ad..c11c360401672151c6e59104aa977accaa3bfc8a 100644 (file)
@@ -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
index fb535b54a07081abc5dea7bb38e3ecace9ea1561..0875bfe5bd8c70280a9e6d1665710b394b854672 100644 (file)
@@ -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;