mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
affs: handle match_strdup failure
fs/affs/super.c (parse_options): Remove useless initialization. Handle match_strdup failure. 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
61d64576a2
commit
6db27dd9d2
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue