diff options
author | tb <> | 2024-08-28 15:48:33 +0000 |
---|---|---|
committer | tb <> | 2024-08-28 15:48:33 +0000 |
commit | 62a9ad72ea2302af48df5e0ecd0c75538ca3f19a (patch) | |
tree | 47f2da8293c6450a7e2052d8fe3abc303f268f6a | |
parent | fb8ae0072a5962f3c195e9ed2bb2879d0f5a8c6e (diff) | |
download | openbsd-62a9ad72ea2302af48df5e0ecd0c75538ca3f19a.tar.gz openbsd-62a9ad72ea2302af48df5e0ecd0c75538ca3f19a.tar.bz2 openbsd-62a9ad72ea2302af48df5e0ecd0c75538ca3f19a.zip |
def_create(): switch from malloc() to calloc()
ok jsing
-rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index ef762b88e7..07f6eceaf1 100644 --- a/src/lib/libcrypto/conf/conf_def.c +++ b/src/lib/libcrypto/conf/conf_def.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: conf_def.c,v 1.36 2024/08/24 12:08:49 tb Exp $ */ | 1 | /* $OpenBSD: conf_def.c,v 1.37 2024/08/28 15:48:33 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -85,7 +85,7 @@ def_create(CONF_METHOD *meth) | |||
85 | { | 85 | { |
86 | CONF *ret; | 86 | CONF *ret; |
87 | 87 | ||
88 | ret = malloc(sizeof(CONF) + sizeof(unsigned short *)); | 88 | ret = calloc(1, sizeof(CONF) + sizeof(unsigned short *)); |
89 | if (ret) | 89 | if (ret) |
90 | if (meth->init(ret) == 0) { | 90 | if (meth->init(ret) == 0) { |
91 | free(ret); | 91 | free(ret); |