mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
hfs: handle match_strdup failure
fs/hfs/super.c (parse_options): Handle match_strdup failure, twice. Signed-off-by: Jim Meyering <[email protected]> Cc: Roman Zippel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6db27dd9d2
commit
3fbe5c3100
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue