summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2017-03-16 15:10:04 +0000
committerpfg <pfg@FreeBSD.org>2017-03-16 15:10:04 +0000
commitf9dcd76f4bf7307298b3fd35fe4556149416b1ae (patch)
treeeeaf607ba3e1f29ea68564eb459dfb88be0945c9 /lib
parent8441d80c6db086daca24cec7a7495172b3ac8399 (diff)
downloadFreeBSD-src-f9dcd76f4bf7307298b3fd35fe4556149416b1ae.zip
FreeBSD-src-f9dcd76f4bf7307298b3fd35fe4556149416b1ae.tar.gz
MFC r315187:
libc: mall cleanup. Let calloc(3) do the multiplication.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/getenv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c
index 8451103..35e24a4 100644
--- a/lib/libc/stdlib/getenv.c
+++ b/lib/libc/stdlib/getenv.c
@@ -342,7 +342,7 @@ __build_env(void)
envVarsSize = envVarsTotal * 2;
/* Create new environment. */
- envVars = calloc(1, sizeof (*envVars) * envVarsSize);
+ envVars = calloc(envVarsSize, sizeof(*envVars));
if (envVars == NULL)
goto Failure;
OpenPOWER on IntegriCloud