]> git.ipfire.org Git - thirdparty/grub.git/commit
net/net: Fix possible dereference to of a NULL pointer
authorDarren Kenny <darren.kenny@oracle.com>
Fri, 27 Nov 2020 15:10:26 +0000 (15:10 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:15 +0000 (15:54 +0100)
commit03f2515ae0c503406f1a99a2178405049c6555db
tree719cd21715f697f368e7dcdf098f1b2fcd2f1d8f
parent8cb2848f9699642a698af84b12ba187cab722031
net/net: Fix possible dereference to of a NULL pointer

It is always possible that grub_zalloc() could fail, so we should check for
a NULL return. Otherwise we run the risk of dereferencing a NULL pointer.

Fixes: CID 296221
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/net.c