]> git.dujemihanovic.xyz Git - u-boot.git/commit
efi_memory: avoid possible null pointer dereference
authorSughosh Ganu <sughosh.ganu@linaro.org>
Tue, 30 Jul 2024 11:11:30 +0000 (16:41 +0530)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 31 Jul 2024 07:54:42 +0000 (09:54 +0200)
commit7aa0addc42ef1674a7baaf9d0428db943c3f2e5f
treedab29b9a140a2e8687e12b1ce3689146a8c2361f
parent22f893047db9560400415316256959ed29167d04
efi_memory: avoid possible null pointer dereference

Populate the previous memory descriptor node pointer only after it's
parent struct has been initialised. The compiler fixes this logic to
do the right thing, but it is better to have correct code in place.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_memory.c