aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index ca4b91510..662e8ab38 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -471,7 +471,7 @@ static const struct rule *next_rule(void)
if (G.parser) {
parse_next_rule();
if (G.rule_vec) { /* mdev -s */
- rule = memcpy(xmalloc(sizeof(G.cur_rule)), &G.cur_rule, sizeof(G.cur_rule));
+ rule = xmemdup(&G.cur_rule, sizeof(G.cur_rule));
G.rule_vec = xrealloc_vector(G.rule_vec, 4, G.rule_idx);
G.rule_vec[G.rule_idx++] = rule;
dbg3("> G.rule_vec[G.rule_idx:%d]=%p", G.rule_idx, G.rule_vec[G.rule_idx]);