summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderaadt <>2014-04-20 14:03:55 +0000
committerderaadt <>2014-04-20 14:03:55 +0000
commita901539e7593dfd0cb8170bdfd94856651828ca2 (patch)
treee5aa2a07bb55ab22887915140533974fc2ab1cca
parentbc2b2162a929a734784c6630be6528f8872aeea2 (diff)
downloadopenbsd-a901539e7593dfd0cb8170bdfd94856651828ca2.tar.gz
openbsd-a901539e7593dfd0cb8170bdfd94856651828ca2.tar.bz2
openbsd-a901539e7593dfd0cb8170bdfd94856651828ca2.zip
calloc() rather than malloc+memset
-rw-r--r--src/lib/libssl/d1_lib.c4
-rw-r--r--src/lib/libssl/src/ssl/d1_lib.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c
index 0217b68928..1dc0efc29c 100644
--- a/src/lib/libssl/d1_lib.c
+++ b/src/lib/libssl/d1_lib.c
@@ -100,8 +100,8 @@ dtls1_new(SSL *s)
100 100
101 if (!ssl3_new(s)) 101 if (!ssl3_new(s))
102 return (0); 102 return (0);
103 if ((d1 = malloc(sizeof *d1)) == NULL) return (0); 103 if ((d1 = calloc(1, sizeof *d1)) == NULL)
104 memset(d1, 0, sizeof *d1); 104 return (0);
105 105
106 /* d1->handshake_epoch=0; */ 106 /* d1->handshake_epoch=0; */
107 107
diff --git a/src/lib/libssl/src/ssl/d1_lib.c b/src/lib/libssl/src/ssl/d1_lib.c
index 0217b68928..1dc0efc29c 100644
--- a/src/lib/libssl/src/ssl/d1_lib.c
+++ b/src/lib/libssl/src/ssl/d1_lib.c
@@ -100,8 +100,8 @@ dtls1_new(SSL *s)
100 100
101 if (!ssl3_new(s)) 101 if (!ssl3_new(s))
102 return (0); 102 return (0);
103 if ((d1 = malloc(sizeof *d1)) == NULL) return (0); 103 if ((d1 = calloc(1, sizeof *d1)) == NULL)
104 memset(d1, 0, sizeof *d1); 104 return (0);
105 105
106 /* d1->handshake_epoch=0; */ 106 /* d1->handshake_epoch=0; */
107 107