summaryrefslogtreecommitdiffstats
path: root/sbin/kldconfig
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-11-07 19:22:20 +0000
committerru <ru@FreeBSD.org>2005-11-07 19:22:20 +0000
commit0b5e9aff8c80cb17f2c5c333749007fc05c51bf1 (patch)
tree4e5ac194487a45611224111c8a1e6597aeff475e /sbin/kldconfig
parent060d886302de539ad53f2a5b82d6952397b353ce (diff)
downloadFreeBSD-src-0b5e9aff8c80cb17f2c5c333749007fc05c51bf1.zip
FreeBSD-src-0b5e9aff8c80cb17f2c5c333749007fc05c51bf1.tar.gz
Fix malloc size (visible on amd64, with "kldconfig -r").
Diffstat (limited to 'sbin/kldconfig')
-rw-r--r--sbin/kldconfig/kldconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/kldconfig/kldconfig.c b/sbin/kldconfig/kldconfig.c
index 6da8d53..403251d 100644
--- a/sbin/kldconfig/kldconfig.c
+++ b/sbin/kldconfig/kldconfig.c
@@ -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");
OpenPOWER on IntegriCloud