fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / net / sched / em_nbyte.c
index 71ea926..005db40 100644 (file)
@@ -9,7 +9,6 @@
  * Authors:    Thomas Graf <tgraf@suug.ch>
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -35,12 +34,10 @@ static int em_nbyte_change(struct tcf_proto *tp, void *data, int data_len,
                return -EINVAL;
 
        em->datalen = sizeof(*nbyte) + nbyte->len;
-       em->data = (unsigned long) kmalloc(em->datalen, GFP_KERNEL);
+       em->data = (unsigned long)kmemdup(data, em->datalen, GFP_KERNEL);
        if (em->data == 0UL)
                return -ENOBUFS;
 
-       memcpy((void *) em->data, data, em->datalen);
-
        return 0;
 }