diff options
author | Arne Schwabe <arne@rfc2549.org> | 2015-02-12 22:22:25 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2015-02-12 22:22:25 +0100 |
commit | 9f0928c6593f937a17b7974b04051c57e3874b20 (patch) | |
tree | 1aaffa07a5c177fef2c1386f1850a688045bec2e /main/openssl/ssl/s23_srvr.c | |
parent | 68d26e1b1b5b411adce714c88532fc8889289f34 (diff) |
Update OpenSSL to AOSP -master
Diffstat (limited to 'main/openssl/ssl/s23_srvr.c')
-rw-r--r-- | main/openssl/ssl/s23_srvr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/openssl/ssl/s23_srvr.c b/main/openssl/ssl/s23_srvr.c index 93ca7d53..3178815e 100644 --- a/main/openssl/ssl/s23_srvr.c +++ b/main/openssl/ssl/s23_srvr.c @@ -192,6 +192,7 @@ int ssl23_accept(SSL *s) } if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH)) { + BUF_MEM_free(buf); ret= -1; goto end; } @@ -602,12 +603,14 @@ int ssl23_get_client_hello(SSL *s) if ((type == 2) || (type == 3)) { /* we have SSLv3/TLSv1 (type 2: SSL2 style, type 3: SSL3/TLS style) */ - s->method = ssl23_get_server_method(s->version); - if (s->method == NULL) + const SSL_METHOD *new_method; + new_method = ssl23_get_server_method(s->version); + if (new_method == NULL) { SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_UNSUPPORTED_PROTOCOL); goto err; } + s->method = new_method; if (!ssl_init_wbio_buffer(s,1)) goto err; |