]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fs/zfs: Add missing NULL check after grub_strdup() call
authorLidong Chen <lidong.chen@oracle.com>
Wed, 22 Jan 2025 07:17:04 +0000 (07:17 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:57 +0000 (15:45 +0100)
Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/zfs/zfs.c

index 6a964974f4d4f391edb4c6f93ddab9a4eb9afd42..3760426318fd300ffde6d798c9330e28b3a3776f 100644 (file)
@@ -3349,6 +3349,8 @@ dnode_get_fullpath (const char *fullpath, struct subvolume *subvol,
       filename = 0;
       snapname = 0;
       fsname = grub_strdup (fullpath);
+      if (!fsname)
+       return grub_errno;
     }
   else
     {