summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/ssl/s2_enc.c
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2007-03-15 20:07:27 +0000
committersimon <simon@FreeBSD.org>2007-03-15 20:07:27 +0000
commit394ba190a3f3c2ec13e67e830b6faeb2dd3e651c (patch)
treed788253de8c917bbf6257b56dbda264342f8095e /crypto/openssl/ssl/s2_enc.c
parent699a8581f98495705b6c4fa8f75d5b9e815d63aa (diff)
downloadFreeBSD-src-394ba190a3f3c2ec13e67e830b6faeb2dd3e651c.zip
FreeBSD-src-394ba190a3f3c2ec13e67e830b6faeb2dd3e651c.tar.gz
Resolve conflicts after import of OpenSSL 0.9.8e.
Diffstat (limited to 'crypto/openssl/ssl/s2_enc.c')
-rw-r--r--crypto/openssl/ssl/s2_enc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/openssl/ssl/s2_enc.c b/crypto/openssl/ssl/s2_enc.c
index 18882bf..1f62acd 100644
--- a/crypto/openssl/ssl/s2_enc.c
+++ b/crypto/openssl/ssl/s2_enc.c
@@ -82,15 +82,18 @@ int ssl2_enc_init(SSL *s, int client)
((s->enc_read_ctx=(EVP_CIPHER_CTX *)
OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL))
goto err;
+
+ /* make sure it's intialized in case the malloc for enc_write_ctx fails
+ * and we exit with an error */
+ rs= s->enc_read_ctx;
+ EVP_CIPHER_CTX_init(rs);
+
if ((s->enc_write_ctx == NULL) &&
((s->enc_write_ctx=(EVP_CIPHER_CTX *)
OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL))
goto err;
- rs= s->enc_read_ctx;
ws= s->enc_write_ctx;
-
- EVP_CIPHER_CTX_init(rs);
EVP_CIPHER_CTX_init(ws);
num=c->key_len;
OpenPOWER on IntegriCloud