mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
loader: should check malloc in zfs_dev_open
malloc can return NULL.
This commit is contained in:
parent
83ba1468ab
commit
f4ed004573
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354282
@ -669,6 +669,8 @@ zfs_dev_open(struct open_file *f, ...)
|
||||
if (!spa)
|
||||
return (ENXIO);
|
||||
mount = malloc(sizeof(*mount));
|
||||
if (mount == NULL)
|
||||
return (ENOMEM);
|
||||
rv = zfs_mount(spa, dev->root_guid, mount);
|
||||
if (rv != 0) {
|
||||
free(mount);
|
||||
|
Loading…
Reference in New Issue
Block a user