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).
This commit is contained in:
Bodo Möller
2008-08-04 22:10:38 +00:00
parent 3e727a3b37
commit 474b3b1cc8
6 changed files with 17 additions and 21 deletions

View File

@@ -591,7 +591,7 @@ int ssl_verify_alarm_type(long type)
return(al);
}
#if !defined(OPENSSL_NO_BUF_FREELISTS) && !defined(OPENSSL_NO_RELEASE_BUFFERS)
#ifndef OPENSSL_NO_BUF_FREELISTS
/* On some platforms, malloc() performance is bad enough that you can't just
* free() and malloc() buffers all the time, so we need to use freelists from
* unused buffers. Currently, each freelist holds memory chunks of only a
@@ -698,7 +698,7 @@ int ssl3_setup_read_buffer(SSL *s)
return 1;
err:
SSLerr(SSL_F_SSL3_SETUP_BUFFERS,ERR_R_MALLOC_FAILURE);
SSLerr(SSL_F_SSL3_SETUP_READ_BUFFER,ERR_R_MALLOC_FAILURE);
return 0;
}
@@ -733,7 +733,7 @@ int ssl3_setup_write_buffer(SSL *s)
return 1;
err:
SSLerr(SSL_F_SSL3_SETUP_BUFFERS,ERR_R_MALLOC_FAILURE);
SSLerr(SSL_F_SSL3_SETUP_WRITE_BUFFER,ERR_R_MALLOC_FAILURE);
return 0;
}