projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d0c2d1
)
reiserfs: Use kstrdup instead of kmalloc/strcpy
author
Ionut-Gabriel Radu
<
[email protected]
>
Sun, 10 Mar 2013 13:06:23 +0000
(15:06 +0200)
committer
Jan Kara
<
[email protected]
>
Mon, 11 Mar 2013 21:05:57 +0000
(22:05 +0100)
Signed-off-by: Ionut-Gabriel Radu <
[email protected]
>
Signed-off-by: Jan Kara <
[email protected]
>
fs/reiserfs/super.c
patch
|
blob
|
history
diff --git
a/fs/reiserfs/super.c
b/fs/reiserfs/super.c
index 194113b1b11bf045f232899d01c28effe6cab786..f8a23c3078f87d5eda59c30d55cea7ecc94b9273 100644
(file)
--- a/
fs/reiserfs/super.c
+++ b/
fs/reiserfs/super.c
@@
-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