linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / sched / cls_fw.c
index e6973d9..7547048 100644 (file)
@@ -18,6 +18,7 @@
  *
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -267,18 +268,20 @@ static int fw_change(struct tcf_proto *tp, unsigned long base,
                return -EINVAL;
 
        if (head == NULL) {
-               head = kzalloc(sizeof(struct fw_head), GFP_KERNEL);
+               head = kmalloc(sizeof(struct fw_head), GFP_KERNEL);
                if (head == NULL)
                        return -ENOBUFS;
+               memset(head, 0, sizeof(*head));
 
                tcf_tree_lock(tp);
                tp->root = head;
                tcf_tree_unlock(tp);
        }
 
-       f = kzalloc(sizeof(struct fw_filter), GFP_KERNEL);
+       f = kmalloc(sizeof(struct fw_filter), GFP_KERNEL);
        if (f == NULL)
                return -ENOBUFS;
+       memset(f, 0, sizeof(*f));
 
        f->id = handle;