diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-04-21 16:34:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-04-21 16:34:44 +0000 |
commit | 4817e127ad26a595033ba6cab354efeef0c86798 (patch) | |
tree | e8a82616e29cb738615f2bd03edbedeb56434a29 /lib/libssl/bio_ssl.c | |
parent | 45b40b60d0df5a71f8c8729a955d697b8b42b7f6 (diff) |
more malloc/realloc/calloc cleanups; ok beck kettenis
Diffstat (limited to 'lib/libssl/bio_ssl.c')
-rw-r--r-- | lib/libssl/bio_ssl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libssl/bio_ssl.c b/lib/libssl/bio_ssl.c index e88137aeca6..4c5c5ac3de9 100644 --- a/lib/libssl/bio_ssl.c +++ b/lib/libssl/bio_ssl.c @@ -105,12 +105,11 @@ ssl_new(BIO *bi) { BIO_SSL *bs; - bs = (BIO_SSL *)malloc(sizeof(BIO_SSL)); + bs = calloc(1, sizeof(BIO_SSL)); if (bs == NULL) { BIOerr(BIO_F_SSL_NEW, ERR_R_MALLOC_FAILURE); return (0); } - memset(bs, 0, sizeof(BIO_SSL)); bi->init = 0; bi->ptr = (char *)bs; bi->flags = 0; |