diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-21 06:19:40 +0300 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 08:30:18 +0300 |
commit | c7b1b24978d89efab7d420bbdc9557dbe6259c89 (patch) | |
tree | f9b05485df5d1cb1532d0251e3da782e1bbad9fe /net/sched/em_meta.c | |
parent | b3ab09f9e1681916df349d54232fbb3f8a79bfa5 (diff) | |
download | linux-c7b1b24978d89efab7d420bbdc9557dbe6259c89.tar.xz |
[SCHED]: Use kmemdup & kzalloc where appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/sched/em_meta.c')
-rw-r--r-- | net/sched/em_meta.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index d3ff3503326a..45d47d37155e 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c @@ -546,10 +546,9 @@ static int meta_var_change(struct meta_value *dst, struct rtattr *rta) { int len = RTA_PAYLOAD(rta); - dst->val = (unsigned long) kmalloc(len, GFP_KERNEL); + dst->val = (unsigned long)kmemdup(RTA_DATA(rta), len, GFP_KERNEL); if (dst->val == 0UL) return -ENOMEM; - memcpy((void *) dst->val, RTA_DATA(rta), len); dst->len = len; return 0; } |