Fix malloc size (visible on amd64, with "kldconfig -r").
This commit is contained in:
parent
060d886302
commit
0b5e9aff8c
@ -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…
x
Reference in New Issue
Block a user