diff options
Diffstat (limited to 'src/lib/libssl/d1_srvr.c')
| -rw-r--r-- | src/lib/libssl/d1_srvr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c index 1c4b2e9f6d..d4d564a688 100644 --- a/src/lib/libssl/d1_srvr.c +++ b/src/lib/libssl/d1_srvr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_srvr.c,v 1.26 2014/06/12 15:49:31 deraadt Exp $ */ | 1 | /* $OpenBSD: d1_srvr.c,v 1.27 2014/06/30 14:13:27 tedu Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
| 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
| @@ -176,7 +176,6 @@ dtls1_get_server_method(int ver) | |||
| 176 | int | 176 | int |
| 177 | dtls1_accept(SSL *s) | 177 | dtls1_accept(SSL *s) |
| 178 | { | 178 | { |
| 179 | BUF_MEM *buf; | ||
| 180 | void (*cb)(const SSL *ssl, int type, int val) = NULL; | 179 | void (*cb)(const SSL *ssl, int type, int val) = NULL; |
| 181 | unsigned long alg_k; | 180 | unsigned long alg_k; |
| 182 | int ret = -1; | 181 | int ret = -1; |
| @@ -241,11 +240,13 @@ dtls1_accept(SSL *s) | |||
| 241 | s->type = SSL_ST_ACCEPT; | 240 | s->type = SSL_ST_ACCEPT; |
| 242 | 241 | ||
| 243 | if (s->init_buf == NULL) { | 242 | if (s->init_buf == NULL) { |
| 243 | BUF_MEM *buf; | ||
| 244 | if ((buf = BUF_MEM_new()) == NULL) { | 244 | if ((buf = BUF_MEM_new()) == NULL) { |
| 245 | ret = -1; | 245 | ret = -1; |
| 246 | goto end; | 246 | goto end; |
| 247 | } | 247 | } |
| 248 | if (!BUF_MEM_grow(buf, SSL3_RT_MAX_PLAIN_LENGTH)) { | 248 | if (!BUF_MEM_grow(buf, SSL3_RT_MAX_PLAIN_LENGTH)) { |
| 249 | BUF_MEM_free(buf); | ||
| 249 | ret = -1; | 250 | ret = -1; |
| 250 | goto end; | 251 | goto end; |
| 251 | } | 252 | } |
