diff options
Diffstat (limited to 'src/lib/libssl/s23_srvr.c')
| -rw-r--r-- | src/lib/libssl/s23_srvr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libssl/s23_srvr.c b/src/lib/libssl/s23_srvr.c index 52dc261814..cd1a5174a7 100644 --- a/src/lib/libssl/s23_srvr.c +++ b/src/lib/libssl/s23_srvr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s23_srvr.c,v 1.28 2014/06/12 15:49:31 deraadt Exp $ */ | 1 | /* $OpenBSD: s23_srvr.c,v 1.29 2014/06/30 14:13:27 tedu Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -174,7 +174,6 @@ ssl23_get_server_method(int ver) | |||
| 174 | int | 174 | int |
| 175 | ssl23_accept(SSL *s) | 175 | ssl23_accept(SSL *s) |
| 176 | { | 176 | { |
| 177 | BUF_MEM *buf; | ||
| 178 | void (*cb)(const SSL *ssl, int type, int val) = NULL; | 177 | void (*cb)(const SSL *ssl, int type, int val) = NULL; |
| 179 | int ret = -1; | 178 | int ret = -1; |
| 180 | int new_state, state; | 179 | int new_state, state; |
| @@ -208,11 +207,13 @@ ssl23_accept(SSL *s) | |||
| 208 | s->type = SSL_ST_ACCEPT; | 207 | s->type = SSL_ST_ACCEPT; |
| 209 | 208 | ||
| 210 | if (s->init_buf == NULL) { | 209 | if (s->init_buf == NULL) { |
| 210 | BUF_MEM *buf; | ||
| 211 | if ((buf = BUF_MEM_new()) == NULL) { | 211 | if ((buf = BUF_MEM_new()) == NULL) { |
| 212 | ret = -1; | 212 | ret = -1; |
| 213 | goto end; | 213 | goto end; |
| 214 | } | 214 | } |
| 215 | if (!BUF_MEM_grow(buf, SSL3_RT_MAX_PLAIN_LENGTH)) { | 215 | if (!BUF_MEM_grow(buf, SSL3_RT_MAX_PLAIN_LENGTH)) { |
| 216 | BUF_MEM_free(buf); | ||
| 216 | ret = -1; | 217 | ret = -1; |
| 217 | goto end; | 218 | goto end; |
| 218 | } | 219 | } |
