Fix malloc size (visible on amd64, with "kldconfig -r").
This commit is contained in:
parent
5baadf2110
commit
c51a26d4b6
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user