]> git.ipfire.org Git - thirdparty/grub.git/commit
net: Check if returned pointer for allocated memory is NULL
authorAlec Brown <alec.r.brown@oracle.com>
Wed, 22 Jan 2025 18:04:44 +0000 (18:04 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:57 +0000 (15:45 +0100)
commit1c06ec900591d1fab6fbacf80dc010541d0a5ec8
tree253e9d3fe68bf4ab9481cd994b016965670eaf91
parentdee2c14fd66bc497cdc74c69fde8c9b84637c8eb
net: Check if returned pointer for allocated memory is NULL

When using grub_malloc(), the function can fail if we are out of memory.
After allocating memory we should check if this function returned NULL
and handle this error if it did.

Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/net.c