]> git.dujemihanovic.xyz Git - u-boot.git/commit
test: eth: Don't crash if env_get returns NULL
authorSean Anderson <seanga2@gmail.com>
Sat, 28 Oct 2023 22:57:27 +0000 (18:57 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 16 Nov 2023 21:21:38 +0000 (16:21 -0500)
commit2a1812de208168f2f4edeb48e8da6b12315ff77f
tree5e89e76952cb6d0c850ca45acc416be3c7d21f85
parent1125e291fbc5ee977a296065d24694a4861785fa
test: eth: Don't crash if env_get returns NULL

env_get can return NULL if it fails to find the variable. Check its result
before using it.

Fixes: 6d9764c2a87 ("dm: test: Add a new test case against dm eth codes for NULL pointer access")
Fixes: df33fd28897 ("test: eth: Add test for ethernet addresses")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
test/dm/eth.c