diff options
author | Bodo Möller <bodo@openssl.org> | 2008-08-04 22:10:38 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2008-08-04 22:10:38 +0000 |
commit | 474b3b1cc80a7c686d4a5fecc6836ec48c7c01d4 (patch) | |
tree | 40e6d7b4773ebfd3bb6e3241b6f460a038932703 /ssl/s3_pkt.c | |
parent | 3e727a3b378072f16b7e0fbd65fbd198d938242f (diff) | |
download | openssl-474b3b1cc80a7c686d4a5fecc6836ec48c7c01d4.zip openssl-474b3b1cc80a7c686d4a5fecc6836ec48c7c01d4.tar.gz openssl-474b3b1cc80a7c686d4a5fecc6836ec48c7c01d4.tar.bz2 |
Fix error codes for memory-saving patch.
Also, get rid of compile-time switch OPENSSL_NO_RELEASE_BUFFERS
because it was rather pointless (the new behavior has to be explicitly
requested by setting SSL_MODE_RELEASE_BUFFERS anyway).
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r-- | ssl/s3_pkt.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index b4a1629..07dd4b2 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -238,11 +238,9 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) if (i <= 0) { rb->left = left; -#ifndef OPENSSL_NO_RELEASE_BUFFERS - if (len+left == 0 && - (s->mode & SSL_MODE_RELEASE_BUFFERS)) - ssl3_release_read_buffer(s); -#endif + if (s->mode & SSL_MODE_RELEASE_BUFFERS) + if (len+left == 0) + ssl3_release_read_buffer(s); return(i); } left+=i; @@ -825,10 +823,8 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, { wb->left=0; wb->offset+=i; -#ifndef OPENSSL_NO_RELEASE_BUFFERS if (s->mode & SSL_MODE_RELEASE_BUFFERS) ssl3_release_write_buffer(s); -#endif s->rwstate=SSL_NOTHING; return(s->s3->wpend_ret); } @@ -983,10 +979,8 @@ start: { s->rstate=SSL_ST_READ_HEADER; rr->off=0; -#ifndef OPENSSL_NO_RELEASE_BUFFERS - if ((s->mode & SSL_MODE_RELEASE_BUFFERS)) + if (s->mode & SSL_MODE_RELEASE_BUFFERS) ssl3_release_read_buffer(s); -#endif } } return(n); |