linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / ipv6 / ip6_flowlabel.c
index 062e526..c19f5e3 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <linux/capability.h>
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
@@ -286,9 +287,10 @@ fl_create(struct in6_flowlabel_req *freq, char __user *optval, int optlen, int *
        int err;
 
        err = -ENOMEM;
-       fl = kzalloc(sizeof(*fl), GFP_KERNEL);
+       fl = kmalloc(sizeof(*fl), GFP_KERNEL);
        if (fl == NULL)
                goto done;
+       memset(fl, 0, sizeof(*fl));
 
        olen = optlen - CMSG_ALIGN(sizeof(*freq));
        if (olen > 0) {
@@ -663,7 +665,7 @@ static int ip6fl_seq_open(struct inode *inode, struct file *file)
 {
        struct seq_file *seq;
        int rc = -ENOMEM;
-       struct ip6fl_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL);
+       struct ip6fl_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
 
        if (!s)
                goto out;
@@ -674,6 +676,7 @@ static int ip6fl_seq_open(struct inode *inode, struct file *file)
 
        seq = file->private_data;
        seq->private = s;
+       memset(s, 0, sizeof(*s));
 out:
        return rc;
 out_kfree: