summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2008-04-29 09:59:07 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 17:06:01 +0200
commit3fbe5c31009d26c7b6b73d5c69fe930a5e9d2e26 (patch)
tree5d8b804fb3bdd9b299cc8f05f16337f65a123045
parentaffs: handle match_strdup failure (diff)
downloadlinux-3fbe5c31009d26c7b6b73d5c69fe930a5e9d2e26.tar.xz
linux-3fbe5c31009d26c7b6b73d5c69fe930a5e9d2e26.zip
hfs: handle match_strdup failure
fs/hfs/super.c (parse_options): Handle match_strdup failure, twice. Signed-off-by: Jim Meyering <meyering@redhat.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/hfs/super.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index 32de44ed0021..8cf67974adf6 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -297,7 +297,8 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
return 0;
}
p = match_strdup(&args[0]);
- hsb->nls_disk = load_nls(p);
+ if (p)
+ hsb->nls_disk = load_nls(p);
if (!hsb->nls_disk) {
printk(KERN_ERR "hfs: unable to load codepage \"%s\"\n", p);
kfree(p);
@@ -311,7 +312,8 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
return 0;
}
p = match_strdup(&args[0]);
- hsb->nls_io = load_nls(p);
+ if (p)
+ hsb->nls_io = load_nls(p);
if (!hsb->nls_io) {
printk(KERN_ERR "hfs: unable to load iocharset \"%s\"\n", p);
kfree(p);