summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/getenv.c
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2017-03-13 04:14:03 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2017-03-13 04:14:03 +0000
commite449183c703e9da775c3dd0e24e608e1fddf9ab5 (patch)
treec9e6832ab4a50d8a232c0de4d13fa4d5c3d21ac8 /lib/libc/stdlib/getenv.c
parentc876175c6160f55a95bd3b0bd19bf11f3df4f4ee (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/getenv.c')
-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 8f2be1c9aba94..e90eccd3d3d3d 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;