Peter Klotz
2009-10-07 15:16:50 UTC
Hello
Initializing and destroying an SSL enabled omniORB in a loop results in
memory leaks because the SSL context string parameters are allocated but
never freed.
These 3 lines in sslTransportImpl.cc cause the problem:
sslContext::certificate_authority_file = CORBA::string_dup(value);
sslContext::key_file = CORBA::string_dup(value);
sslContext::key_file_password = CORBA::string_dup(value);
The attached patch against omniORB 4.1.4 simply calls
CORBA::string_free() before allocating the new value.
Since all values are zero initialized on startup the fix should be safe.
Regards, Peter.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omniORB-4.1.4-sslContextInitialization.patch
Type: text/x-patch
Size: 1053 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20091007/e0edf69c/omniORB-4.1.4-sslContextInitialization.bin
Initializing and destroying an SSL enabled omniORB in a loop results in
memory leaks because the SSL context string parameters are allocated but
never freed.
These 3 lines in sslTransportImpl.cc cause the problem:
sslContext::certificate_authority_file = CORBA::string_dup(value);
sslContext::key_file = CORBA::string_dup(value);
sslContext::key_file_password = CORBA::string_dup(value);
The attached patch against omniORB 4.1.4 simply calls
CORBA::string_free() before allocating the new value.
Since all values are zero initialized on startup the fix should be safe.
Regards, Peter.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omniORB-4.1.4-sslContextInitialization.patch
Type: text/x-patch
Size: 1053 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20091007/e0edf69c/omniORB-4.1.4-sslContextInitialization.bin