diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bss_acpt.c')
| -rw-r--r-- | src/lib/libcrypto/bio/bss_acpt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c index 4ab5856ed6..916af3cb20 100644 --- a/src/lib/libcrypto/bio/bss_acpt.c +++ b/src/lib/libcrypto/bio/bss_acpt.c | |||
| @@ -137,10 +137,8 @@ BIO_ACCEPT_new(void) | |||
| 137 | { | 137 | { |
| 138 | BIO_ACCEPT *ret; | 138 | BIO_ACCEPT *ret; |
| 139 | 139 | ||
| 140 | if ((ret = (BIO_ACCEPT *)malloc(sizeof(BIO_ACCEPT))) == NULL) | 140 | if ((ret = calloc(1, sizeof(BIO_ACCEPT))) == NULL) |
| 141 | return (NULL); | 141 | return (NULL); |
| 142 | |||
| 143 | memset(ret, 0, sizeof(BIO_ACCEPT)); | ||
| 144 | ret->accept_sock = -1; | 142 | ret->accept_sock = -1; |
| 145 | ret->bind_mode = BIO_BIND_NORMAL; | 143 | ret->bind_mode = BIO_BIND_NORMAL; |
| 146 | return (ret); | 144 | return (ret); |
