Don't set *dev in the zfs root case, it may be NULL and will correctly be

set later in the function. This fixes a potential NULL pointer dereference
found on arm64.

Obtained from:	ABT Systems Ltd
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Andrew Turner 2016-08-25 12:42:41 +00:00
parent 9f25943b82
commit ef63b26a5f

View File

@ -120,7 +120,6 @@ efi_parsedev(struct devdesc **dev, const char *devspec, const char **path)
free(idev);
return (err);
}
*dev = idev;
cp = strchr(np + 1, ':');
} else
#endif