Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fbe5c31 authored by Jim Meyering's avatar Jim Meyering Committed by Linus Torvalds
Browse files

hfs: handle match_strdup failure



fs/hfs/super.c (parse_options): Handle match_strdup failure, twice.

Signed-off-by: default avatarJim Meyering <meyering@redhat.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6db27dd9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -297,6 +297,7 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
				return 0;
			}
			p = match_strdup(&args[0]);
			if (p)
				hsb->nls_disk = load_nls(p);
			if (!hsb->nls_disk) {
				printk(KERN_ERR "hfs: unable to load codepage \"%s\"\n", p);
@@ -311,6 +312,7 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
				return 0;
			}
			p = match_strdup(&args[0]);
			if (p)
				hsb->nls_io = load_nls(p);
			if (!hsb->nls_io) {
				printk(KERN_ERR "hfs: unable to load iocharset \"%s\"\n", p);