diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-04-20 14:03:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-04-20 14:03:56 +0000 |
commit | 14478980faaee69e7586e445d64dcd894c3539dc (patch) | |
tree | d1db13c7ec672b8aaa8708944b0e3ee57b4a3a3b | |
parent | b12a98a4c0969a124eeeaba0536db1ed858a6180 (diff) |
calloc() rather than malloc+memset
-rw-r--r-- | lib/libssl/src/ssl/d1_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/src/ssl/d1_lib.c b/lib/libssl/src/ssl/d1_lib.c index 0217b68928f..1dc0efc29ca 100644 --- a/lib/libssl/src/ssl/d1_lib.c +++ b/lib/libssl/src/ssl/d1_lib.c @@ -100,8 +100,8 @@ dtls1_new(SSL *s) if (!ssl3_new(s)) return (0); - if ((d1 = malloc(sizeof *d1)) == NULL) return (0); - memset(d1, 0, sizeof *d1); + if ((d1 = calloc(1, sizeof *d1)) == NULL) + return (0); /* d1->handshake_epoch=0; */ |