diff options
author | Matt Caswell <matt@openssl.org> | 2016-01-13 11:44:04 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-03-07 21:39:27 +0000 |
commit | 0220fee47f912c9c89efe24c09e10f4d452a4d42 (patch) | |
tree | 09acd16b45de65d81c35b689afd3ee608be9d430 /ssl/s3_enc.c | |
parent | 94777c9c86a2b2ea2726c49d6c8f61078558beba (diff) | |
download | openssl-0220fee47f912c9c89efe24c09e10f4d452a4d42.zip openssl-0220fee47f912c9c89efe24c09e10f4d452a4d42.tar.gz openssl-0220fee47f912c9c89efe24c09e10f4d452a4d42.tar.bz2 |
Lazily initialise the compression buffer
With read pipelining we use multiple SSL3_RECORD structures for reading.
There are SSL_MAX_PIPELINES (32) of them defined (typically not all of these
would be used). Each one has a 16k compression buffer allocated! This
results in a significant amount of memory being consumed which, most of the
time, is not needed. This change swaps the allocation of the compression
buffer to be lazy so that it is only done immediately before it is actually
used.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r-- | ssl/s3_enc.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 1c493e2..35ef948 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -251,8 +251,6 @@ int ssl3_change_cipher_state(SSL *s, int which) SSL_R_COMPRESSION_LIBRARY_ERROR); goto err2; } - if (!RECORD_LAYER_setup_comp_buffer(&s->rlayer)) - goto err; } #endif RECORD_LAYER_reset_read_sequence(&s->rlayer); |