]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: lwip: check if network device is available in do_dhcp
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 5 Dec 2024 19:17:36 +0000 (20:17 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 19 Dec 2024 18:17:37 +0000 (12:17 -0600)
commitd701c6ab4220a3f5e0fdef06720816d67c46f56d
tree2027cc0c02345f11652b09cc8eeae795ffc52b53
parentb6691d0add999459393a19f0f02b66243ee2a4ae
net: lwip: check if network device is available in do_dhcp

eth_get_dev() returns NULL if no network device is available.
Not checking the return value leads to a crash when the device
pointer is dereferenced.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
net/lwip/dhcp.c