Home
last modified time | relevance | path

Searched hist:dafe2078a75af1abe4780313ef8dd8491ba8598f (Results 1 – 1 of 1) sorted by relevance

/linux/net/ipv4/
H A Dnexthop.cdiff dafe2078a75af1abe4780313ef8dd8491ba8598f Mon Jun 01 13:12:01 CEST 2020 Patrick Eigensatz <patrickeigensatz@gmail.com> 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: Coverity <scan-admin@coverity.com>
Signed-off-by: Patrick Eigensatz <patrickeigensatz@gmail.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>