summaryrefslogtreecommitdiffstats
path: root/net/sched/act_simple.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-12-04 05:59:07 +0100
committerPaul Mackerras <paulus@samba.org>2006-12-04 05:59:07 +0100
commit79acbb3ff2d8095b692e1502b9eb2ccec348de26 (patch)
tree6ab773e5a8f9de2cd6443362b21d0d6fffe3b35e /net/sched/act_simple.c
parent[PATCH] ppc: Fix io.h for config with CONFIG_PCI not set (diff)
parent[XFRM]: Fix aevent structuring to be more complete. (diff)
downloadlinux-79acbb3ff2d8095b692e1502b9eb2ccec348de26.tar.xz
linux-79acbb3ff2d8095b692e1502b9eb2ccec348de26.zip
Merge branch 'linux-2.6' into for-linus
Diffstat (limited to 'net/sched/act_simple.c')
-rw-r--r--net/sched/act_simple.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 901571a67707..5fe80854ca91 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;
}