1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-14 14:55:41 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152169

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