]> Pileus Git - ~andy/linux/blobdiff - net/ipv6/ip6_output.c
ipv6: fix possible crashes in ip6_cork_release()
[~andy/linux] / net / ipv6 / ip6_output.c
index d2eedf192330caf5a963c27ddaceffae5e4886b8..dae1949019d7b8dc77d14c39478571e86ad89f34 100644 (file)
@@ -1147,7 +1147,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
                        if (WARN_ON(np->cork.opt))
                                return -EINVAL;
 
-                       np->cork.opt = kmalloc(opt->tot_len, sk->sk_allocation);
+                       np->cork.opt = kzalloc(opt->tot_len, sk->sk_allocation);
                        if (unlikely(np->cork.opt == NULL))
                                return -ENOBUFS;