diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-21 01:19:40 -0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-02 21:30:18 -0800 |
commit | c7b1b24978d89efab7d420bbdc9557dbe6259c89 (patch) | |
tree | f9b05485df5d1cb1532d0251e3da782e1bbad9fe /net/sched/act_simple.c | |
parent | b3ab09f9e1681916df349d54232fbb3f8a79bfa5 (diff) | |
download | kernel_samsung_tuna-c7b1b24978d89efab7d420bbdc9557dbe6259c89.zip kernel_samsung_tuna-c7b1b24978d89efab7d420bbdc9557dbe6259c89.tar.gz kernel_samsung_tuna-c7b1b24978d89efab7d420bbdc9557dbe6259c89.tar.bz2 |
[SCHED]: Use kmemdup & kzalloc where appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/sched/act_simple.c')
-rw-r--r-- | net/sched/act_simple.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 901571a..5fe8085 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c @@ -71,11 +71,10 @@ static int tcf_simp_release(struct tcf_defact *d, int bind) static int alloc_defdata(struct tcf_defact *d, u32 datalen, void *defdata) { - d->tcfd_defdata = kmalloc(datalen, GFP_KERNEL); + d->tcfd_defdata = kmemdup(defdata, datalen, GFP_KERNEL); if (unlikely(!d->tcfd_defdata)) return -ENOMEM; d->tcfd_datalen = datalen; - memcpy(d->tcfd_defdata, defdata, datalen); return 0; } |