Commit 680bd89d authored by David S. Miller's avatar David S. Miller

[IPV6]: Fix two ipv6_addr_addr failure checks.

parent 48bdef02
......@@ -702,7 +702,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i
ift = ipv6_count_addresses(idev) < IPV6_MAX_ADDRESSES ?
ipv6_add_addr(idev, &addr, tmp_plen,
ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK, IFA_F_TEMPORARY) : 0;
if (IS_ERR(ift)) {
if (!ift || IS_ERR(ift)) {
in6_dev_put(idev);
in6_ifa_put(ifp);
printk(KERN_INFO
......@@ -1410,7 +1410,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
ifp = ipv6_add_addr(in6_dev, &addr, pinfo->prefix_len,
addr_type&IPV6_ADDR_SCOPE_MASK, 0);
if (IS_ERR(ifp)) {
if (!ifp || IS_ERR(ifp)) {
in6_dev_put(in6_dev);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment