diff options
author | pfg <pfg@FreeBSD.org> | 2017-03-16 15:10:04 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2017-03-16 15:10:04 +0000 |
commit | f9dcd76f4bf7307298b3fd35fe4556149416b1ae (patch) | |
tree | eeaf607ba3e1f29ea68564eb459dfb88be0945c9 /lib | |
parent | 8441d80c6db086daca24cec7a7495172b3ac8399 (diff) | |
download | FreeBSD-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.c | 2 |
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; |