inet: Fix BUG triggered by __rt{,6}_get_peer().
authorDavid S. Miller <davem@davemloft.net>
Mon, 11 Jun 2012 22:52:29 +0000 (15:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jun 2012 22:52:29 +0000 (15:52 -0700)
If no peer actually gets attached (either because create is zero or
the peer allocation fails) we'll trigger a BUG because we
unconditionally do an rt{,6}_peer_ptr() afterwards.

Fix this by guarding it with the proper check.

Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found