summaryrefslogtreecommitdiffstats
path: root/fs/affs
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2008-04-29 09:59:06 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 17:06:01 +0200
commit6db27dd9d26fb270adaa4c265df65ccb49638bd0 (patch)
treeaa94446b41a2ae7769fb3863509c2ac2554dedae /fs/affs
parentfs: remove unused fops from struct char_device_struct (diff)
downloadlinux-6db27dd9d26fb270adaa4c265df65ccb49638bd0.tar.xz
linux-6db27dd9d26fb270adaa4c265df65ccb49638bd0.zip
affs: handle match_strdup failure
fs/affs/super.c (parse_options): Remove useless initialization. Handle match_strdup failure. 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>
Diffstat (limited to 'fs/affs')
-rw-r--r--fs/affs/super.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c
index d2dc047cb479..01d25d532541 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -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;