]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/zfs: Check if returned pointer for allocated memory is NULL
authorLidong Chen <lidong.chen@oracle.com>
Wed, 22 Jan 2025 07:17:01 +0000 (07:17 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:57 +0000 (15:45 +0100)
commit13065f69dae0eeb60813809026de5bd021051892
treebe6f30c9022359854f8676634724d3aa92e96c6e
parent7f38e32c7ebeaebb79e2c71e3c7d5ea367d3a39c
fs/zfs: Check if returned pointer for allocated memory is NULL

When using grub_malloc() or grub_zalloc(), these functions can fail if
we are out of memory. After allocating memory we should check if these
functions returned NULL and handle this error if they did.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/zfs/zfs.c