From: Jim Meyering Date: Tue, 29 Apr 2008 07:59:08 +0000 (-0700) Subject: hfsplus: handle match_strdup failure X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cd6fda36089cf3b450821228c2f575a3b5d0e7a7;p=openwrt%2Fstaging%2Fblogic.git hfsplus: handle match_strdup failure fs/hfsplus/options.c (hfsplus_parse_options): Handle match_strdup failure. Signed-off-by: Jim Meyering Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index dc64fac00831..9997cbf8beb5 100644 --- a/fs/hfsplus/options.c +++ b/fs/hfsplus/options.c @@ -132,7 +132,8 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi) return 0; } p = match_strdup(&args[0]); - sbi->nls = load_nls(p); + if (p) + sbi->nls = load_nls(p); if (!sbi->nls) { printk(KERN_ERR "hfs: unable to load nls mapping \"%s\"\n", p); kfree(p);