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

Commit af591ad8 authored by Ionut-Gabriel Radu's avatar Ionut-Gabriel Radu Committed by Jan Kara
Browse files

reiserfs: Use kstrdup instead of kmalloc/strcpy



Signed-off-by: default avatarIonut-Gabriel Radu <ihonius@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 8d0c2d10
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1147,8 +1147,7 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
							 "on filesystem root.");
					return 0;
				}
				qf_names[qtype] =
				    kmalloc(strlen(arg) + 1, GFP_KERNEL);
				qf_names[qtype] = kstrdup(arg, GFP_KERNEL);
				if (!qf_names[qtype]) {
					reiserfs_warning(s, "reiserfs-2502",
							 "not enough memory "
@@ -1156,7 +1155,6 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
							 "quotafile name.");
					return 0;
				}
				strcpy(qf_names[qtype], arg);
				if (qtype == USRQUOTA)
					*mount_options |= 1 << REISERFS_USRQUOTA;
				else