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

Commit 6db27dd9 authored by Jim Meyering's avatar Jim Meyering Committed by Linus Torvalds
Browse files

affs: handle match_strdup failure



fs/affs/super.c (parse_options): Remove useless initialization.  Handle
match_strdup failure.

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 61d64576
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -199,7 +199,6 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s
		case Opt_prefix:
			/* Free any previous prefix */
			kfree(*prefix);
			*prefix = NULL;
			*prefix = match_strdup(&args[0]);
			if (!*prefix)
				return 0;
@@ -233,6 +232,8 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s
			break;
		case Opt_volume: {
			char *vol = match_strdup(&args[0]);
			if (!vol)
				return 0;
			strlcpy(volume, vol, 32);
			kfree(vol);
			break;