From: Jim Meyering Date: Tue, 29 Apr 2008 07:59:06 +0000 (-0700) Subject: affs: handle match_strdup failure X-Git-Tag: v2.6.26-rc1~649 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6db27dd9d26fb270adaa4c265df65ccb49638bd0;p=linux-2.6-omap-h63xx.git affs: handle match_strdup failure fs/affs/super.c (parse_options): Remove useless initialization. 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/affs/super.c b/fs/affs/super.c index d2dc047cb47..01d25d53254 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;