summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-08-28 15:48:34 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-08-28 15:48:34 +0000
commitdf2e008e8b960475b743eb099b1141957a52e8c4 (patch)
tree842b297d2449786444d952575c5cefd8c2003c21 /lib/libcrypto
parent7da0b368fc1105eccc002b808184deeaa679cfe0 (diff)
def_create(): switch from malloc() to calloc()
ok jsing
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/conf/conf_def.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/conf/conf_def.c b/lib/libcrypto/conf/conf_def.c
index ef762b88e73..07f6eceaf13 100644
--- a/lib/libcrypto/conf/conf_def.c
+++ b/lib/libcrypto/conf/conf_def.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf_def.c,v 1.36 2024/08/24 12:08:49 tb Exp $ */
+/* $OpenBSD: conf_def.c,v 1.37 2024/08/28 15:48:33 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -85,7 +85,7 @@ def_create(CONF_METHOD *meth)
{
CONF *ret;
- ret = malloc(sizeof(CONF) + sizeof(unsigned short *));
+ ret = calloc(1, sizeof(CONF) + sizeof(unsigned short *));
if (ret)
if (meth->init(ret) == 0) {
free(ret);