aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2012-06-19 14:57:12 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-06-19 22:54:58 +0200
commit7d2abe27ddf5b5aa0edeb619ef95db6fc2c98afe (patch)
treeebe375106ce013880518ebe3a4e29fb365b84063 /lib
parent64962b02186b0ee3f27a4ee5b2c157669a9d6df3 (diff)
curl_schannel.c: Avoid unnecessary realloc calls to reduce buffer size
Diffstat (limited to 'lib')
-rw-r--r--lib/curl_schannel.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/curl_schannel.c b/lib/curl_schannel.c
index 885edee20..ba010171e 100644
--- a/lib/curl_schannel.c
+++ b/lib/curl_schannel.c
@@ -886,22 +886,6 @@ schannel_recv(struct connectdata *conn, int sockindex,
connssl->decdata_offset -= size;
}
- /* reduce internal buffer length to reduce memory usage */
- if(connssl->encdata_length > CURL_SCHANNEL_BUFFER_INIT_SIZE) {
- connssl->encdata_length =
- connssl->encdata_offset > CURL_SCHANNEL_BUFFER_INIT_SIZE ?
- connssl->encdata_offset : CURL_SCHANNEL_BUFFER_INIT_SIZE;
- connssl->encdata_buffer = realloc(connssl->encdata_buffer,
- connssl->encdata_length);
- }
- if(connssl->decdata_length > CURL_SCHANNEL_BUFFER_INIT_SIZE) {
- connssl->decdata_length =
- connssl->decdata_offset > CURL_SCHANNEL_BUFFER_INIT_SIZE ?
- connssl->decdata_offset : CURL_SCHANNEL_BUFFER_INIT_SIZE;
- connssl->decdata_buffer = realloc(connssl->decdata_buffer,
- connssl->decdata_length);
- }
-
/* check if the server closed the connection */
if(ret <= 0 && ( /* special check for Windows 2000 Professional */
sspi_status == SEC_I_CONTEXT_EXPIRED || (sspi_status == SEC_E_OK &&