]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/sfs: Check if allocated memory is NULL
authorAlec Brown <alec.r.brown@oracle.com>
Tue, 28 Jan 2025 05:15:50 +0000 (05:15 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:57 +0000 (15:45 +0100)
commite3c578a56f9294e286b6028ca7c1def997a17b15
tree7823a5f0307246eb290c92f820d80563679a776b
parent1c06ec900591d1fab6fbacf80dc010541d0a5ec8
fs/sfs: Check if allocated memory is NULL

When using grub_zalloc(), if we are out of memory, this function can fail.
After allocating memory, we should check if grub_zalloc() returns NULL.
If so, we should handle this error.

Fixes: CID 473856
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/sfs.c