Skip to content
Commit e1a67642 authored by Neal Cardwell's avatar Neal Cardwell Committed by David S. Miller
Browse files

ipv4: avoid passing NULL to inet_putpeer() in icmpv4_xrlim_allow()



inet_getpeer_v4() can return NULL under OOM conditions, and while
inet_peer_xrlim_allow() is OK with a NULL peer, inet_putpeer() will
crash.

This code path now uses the same idiom as the others from:
1d861aa4 ("inet: Minimize use of
cached route inetpeer.").

Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81b40110
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment