diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2016-03-06 21:40:58 +0100 |
---|---|---|
committer | FdaSilvaYY <fdasilvayy@gmail.com> | 2016-05-29 01:36:11 +0200 |
commit | f59f23c38331e3adf58c0317caf319a7bfd82dd1 (patch) | |
tree | d2cea2e198f2d217dd688ee235217a473f00629d /crypto/bio | |
parent | 8e89e85f556f549f05d3b49f5408a217ac5e3700 (diff) |
Add more zalloc
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/997)
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bss_bio.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c index 9f1300e0b9..de34f6bf37 100644 --- a/crypto/bio/bss_bio.c +++ b/crypto/bio/bss_bio.c @@ -74,20 +74,13 @@ struct bio_bio_st { static int bio_new(BIO *bio) { - struct bio_bio_st *b; + struct bio_bio_st *b = OPENSSL_zalloc(sizeof(*b)); - b = OPENSSL_malloc(sizeof(*b)); if (b == NULL) return 0; - b->peer = NULL; - b->closed = 0; - b->len = 0; - b->offset = 0; /* enough for one TLS record (just a default) */ b->size = 17 * 1024; - b->buf = NULL; - b->request = 0; bio->ptr = b; return 1; |