提交 9fcc2e8a 编写于 作者: J Jayachandran C 提交者: Arnaldo Carvalho de Melo

[IPV4]: Fix issue reported by Coverity in ipv4/fib_frontend.c

fib_del_ifaddr() dereferences ifa->ifa_dev, so the code already assumes that
ifa->ifa_dev is non-NULL, the check is unnecessary.

Signed-off-by: Jayachandran C. <c.jayachandran at gmail.com>
Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
上级 360ac8e2
...@@ -591,7 +591,7 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, ...@@ -591,7 +591,7 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
break; break;
case NETDEV_DOWN: case NETDEV_DOWN:
fib_del_ifaddr(ifa); fib_del_ifaddr(ifa);
if (ifa->ifa_dev && ifa->ifa_dev->ifa_list == NULL) { if (ifa->ifa_dev->ifa_list == NULL) {
/* Last address was deleted from this interface. /* Last address was deleted from this interface.
Disable IP. Disable IP.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册