Browse Source

Fix a leak in affs_fill_super()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 15 years ago
parent
commit
afc70ed05a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      fs/affs/super.c

+ 2 - 0
fs/affs/super.c

@@ -316,6 +316,8 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
 				&blocksize,&sbi->s_prefix,
 				sbi->s_volume, &mount_flags)) {
 		printk(KERN_ERR "AFFS: Error parsing options\n");
+		kfree(sbi->s_prefix);
+		kfree(sbi);
 		return -EINVAL;
 	}
 	/* N.B. after this point s_prefix must be released */