Fix malloc size (visible on amd64, with "kldconfig -r").

This commit is contained in:
Ruslan Ermilov 2005-11-07 19:22:20 +00:00
parent 5baadf2110
commit c51a26d4b6

View File

@ -270,7 +270,7 @@ parsepath(struct pathhead *pathq, char *path, int uniq)
while ((p = strsep(&path, ";")) != NULL)
if (!uniq) {
if (((pe = malloc(sizeof(pe))) == NULL) ||
if (((pe = malloc(sizeof(*pe))) == NULL) ||
((pe->path = strdup(p)) == NULL)) {
errno = ENOMEM;
err(1, "allocating path element");