Skip to content
Commit dafe2078 authored by Patrick Eigensatz's avatar Patrick Eigensatz Committed by David S. Miller
Browse files

ipv4: nexthop: Fix deadcode issue by performing a proper NULL check



After allocating the spare nexthop group it should be tested for kzalloc()
returning NULL, instead the already used nexthop group (which cannot be
NULL at this point) had been tested so far.

Additionally, if kzalloc() fails, return ERR_PTR(-ENOMEM) instead of NULL.

Coverity-id: 1463885
Reported-by: default avatarCoverity <scan-admin@coverity.com>
Signed-off-by: default avatarPatrick Eigensatz <patrickeigensatz@gmail.com>
Acked-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 07f6ecec
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