ip: fix error handling in ip_finish_output2()
authorVasiliy Kulikov <segoon@openwall.com>
Mon, 6 Aug 2012 03:55:29 +0000 (03:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Aug 2012 20:30:01 +0000 (13:30 -0700)
commit1e41e0d5db4f7d4753464069d69cf62c5fbe832f
tree85e0fc87c1df524a936d2c0d61a86bd9f994c760
parentf4ed0a8a64cfbc1680dfefec91b17c718c1549d4
ip: fix error handling in ip_finish_output2()

__neigh_create() returns either a pointer to struct neighbour or PTR_ERR().
But the caller expects it to return either a pointer or NULL.  Replace
the NULL check with IS_ERR() check.

The bug was introduced in 5ea2c5b05a01540d2252a5116207788a9f26372f
("ipv4: Make neigh lookups directly in output packet path.").

Signed-off-by: Vasily Kulikov <segoon@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c