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

This commit is contained in:
ru 2005-11-07 19:22:20 +00:00
parent 060d886302
commit 0b5e9aff8c

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");