loader: should check malloc in zfs_dev_open
malloc can return NULL.
This commit is contained in:
parent
83ba1468ab
commit
f4ed004573
@ -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