[omniORB] Patch to fix leak in SSL context initialization
Duncan Grisby
duncan at grisby.org
Mon Oct 19 15:43:31 BST 2009
On Sun, 2009-10-18 at 16:56 +0200, Peter Klotz wrote:
> Could you please apply this patch or do you have any objections?
Sorry for not replying sooner.
Unfortunately, I can't apply your fix. It's documented that it is valid
to assign values directly to the sslContext static variables (it's what
the ssl_echo example program does too). Therefore, the pointers in
sslContext::key_file etc., are not necessarily things that can be freed
with CORBA::string_free.
Without changing the API (and thus breaking binary compatibility with
the library), it's not possible to simply free the strings. The only
option would be to maintain a flag for each string, indicating whether
it should be freed or not. In that case, the freeing should happen in
the initialiser detach() method.
Do you have real code that repeatedly destroys and reinitialises the
ORB, or is it just a test?
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list