diff options
| author | deraadt <> | 2014-04-20 14:03:55 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-04-20 14:03:55 +0000 |
| commit | de12e86671704471d5c3e86111054c59d9efb9b1 (patch) | |
| tree | e5aa2a07bb55ab22887915140533974fc2ab1cca /src/lib/libssl/d1_lib.c | |
| parent | cc8ae629bf12921f18875a3ae57171bed7a0be58 (diff) | |
| download | openbsd-de12e86671704471d5c3e86111054c59d9efb9b1.tar.gz openbsd-de12e86671704471d5c3e86111054c59d9efb9b1.tar.bz2 openbsd-de12e86671704471d5c3e86111054c59d9efb9b1.zip | |
calloc() rather than malloc+memset
Diffstat (limited to 'src/lib/libssl/d1_lib.c')
| -rw-r--r-- | src/lib/libssl/d1_lib.c | 4 |
1 files changed, 2 insertions, 2 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 | ||
