diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/malloc-wrapper.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/malloc-wrapper.c b/src/lib/libcrypto/malloc-wrapper.c index e13cc23373..fb42169b2f 100644 --- a/src/lib/libcrypto/malloc-wrapper.c +++ b/src/lib/libcrypto/malloc-wrapper.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: malloc-wrapper.c,v 1.9 2024/03/02 11:28:46 tb Exp $ */ | 1 | /* $OpenBSD: malloc-wrapper.c,v 1.10 2024/03/02 11:35:09 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Bob Beck | 3 | * Copyright (c) 2014 Bob Beck |
4 | * | 4 | * |
@@ -37,10 +37,8 @@ CRYPTO_set_mem_ex_functions(void *(*m)(size_t, const char *, int), | |||
37 | LCRYPTO_ALIAS(CRYPTO_set_mem_ex_functions); | 37 | LCRYPTO_ALIAS(CRYPTO_set_mem_ex_functions); |
38 | 38 | ||
39 | void * | 39 | void * |
40 | CRYPTO_malloc(int num, const char *file, int line) | 40 | CRYPTO_malloc(size_t num, const char *file, int line) |
41 | { | 41 | { |
42 | if (num <= 0) | ||
43 | return NULL; | ||
44 | return malloc(num); | 42 | return malloc(num); |
45 | } | 43 | } |
46 | 44 | ||
@@ -51,7 +49,7 @@ CRYPTO_strdup(const char *str, const char *file, int line) | |||
51 | } | 49 | } |
52 | 50 | ||
53 | void | 51 | void |
54 | CRYPTO_free(void *ptr) | 52 | CRYPTO_free(void *ptr, const char *file, int line) |
55 | { | 53 | { |
56 | free(ptr); | 54 | free(ptr); |
57 | } | 55 | } |