diff options
author | 2014-04-20 14:03:55 +0000 | |
---|---|---|
committer | 2014-04-20 14:03:55 +0000 | |
commit | d870f21cc21ecd367fd3228e389e07a619d36448 (patch) | |
tree | 2ef07324bc3149923aa551c2df723a988477ce4d /lib/libssl/d1_lib.c | |
parent | Fix indentation, adding braces and combining a nested if to reduce depth (diff) | |
download | wireguard-openbsd-d870f21cc21ecd367fd3228e389e07a619d36448.tar.xz wireguard-openbsd-d870f21cc21ecd367fd3228e389e07a619d36448.zip |
calloc() rather than malloc+memset
Diffstat (limited to 'lib/libssl/d1_lib.c')
-rw-r--r-- | lib/libssl/d1_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/d1_lib.c b/lib/libssl/d1_lib.c index 0217b68928f..1dc0efc29ca 100644 --- a/lib/libssl/d1_lib.c +++ b/lib/libssl/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; */ |