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)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commitd1871a3c8d8035c516867898894c25f0304c4c03
tree391ba6b5beddfb9a4154cc23ea5582c190b0202c
parent880634972c2f8fbeb8d488b734db42a1085e03e4
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>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-zfs-Check-if-returned-pointer-for-allocated-memory-is-.patch
grub-core/fs/zfs/zfs.c