summaryrefslogtreecommitdiff
path: root/bin/ksh
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2017-11-02 06:55:36 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2017-11-02 06:55:36 +0000
commit04c60c86cda9b9a1905a606fe37d16ae24e7e3b1 (patch)
tree2c9c877ff86a93e89c64874b4b216602a9bca7b2 /bin/ksh
parentbb75411ac8ed3f304b176a98307a2a76fad6b15f (diff)
Switch calloc(3) back to malloc(3). The call to calloc was introduced
by the plaintext history diff, but the code that may have depended on this was since removed from history.c. None of the code introduced between the plaintext history commit and now depends on calloc(3). This way we can again use malloc.conf(5)'s J option to recognize use of uninitialized memory. ok jca
Diffstat (limited to 'bin/ksh')
-rw-r--r--bin/ksh/alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/alloc.c b/bin/ksh/alloc.c
index e1de35af5fa..e3129bfe1fe 100644
--- a/bin/ksh/alloc.c
+++ b/bin/ksh/alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alloc.c,v 1.17 2017/08/15 17:57:57 jca Exp $ */
+/* $OpenBSD: alloc.c,v 1.18 2017/11/02 06:55:35 tb Exp $ */
/* Public domain, like most of the rest of ksh */
@@ -47,7 +47,7 @@ alloc(size_t size, Area *ap)
if (size > SIZE_MAX - sizeof(struct link))
internal_errorf(1, "unable to allocate memory");
- l = calloc(1, sizeof(struct link) + size);
+ l = malloc(sizeof(struct link) + size);
if (l == NULL)
internal_errorf(1, "unable to allocate memory");
l->next = ap->freelist;