diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-03-11 12:33:20 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-03-11 12:33:20 +0000 |
| commit | ddb00a944561eabd378785e77f8b05ac58d23d36 (patch) | |
| tree | bfee526b003a22e70e920b48df5fd1fed0afbfb4 /src/SocketCore.cc | |
| parent | ce5c17f1b3af278ca1d3d737d15216b3e041527e (diff) | |
2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Allocate memory for peekBuf in initiateSecureConnection() to
avoid
the unused 4KB memory when ssl is not used.
* src/SocketCore.cc
Diffstat (limited to 'src/SocketCore.cc')
| -rw-r--r-- | src/SocketCore.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/SocketCore.cc b/src/SocketCore.cc index e0e54104..f792f71a 100644 --- a/src/SocketCore.cc +++ b/src/SocketCore.cc @@ -82,7 +82,7 @@ void SocketCore::init() sslSession = NULL; sslXcred = NULL; peekBufMax = 4096; - peekBuf = new char[peekBufMax]; + peekBuf = 0; peekBufLength = 0; #endif //HAVE_LIBGNUTLS } @@ -581,6 +581,7 @@ void SocketCore::initiateSecureConnection() if(ret < 0) { throw new DlAbortEx(EX_SSL_INIT_FAILURE, gnutls_strerror(ret)); } + peekBuf = new char[peekBufMax]; } #endif // HAVE_LIBGNUTLS |
