Alex Mantaut created AXIS2C-1632:
------------------------------------

             Summary: Patch to fix Stability issues and memory leaks on hash 
keys
                 Key: AXIS2C-1632
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1632
             Project: Axis2-C
          Issue Type: Bug
          Components: core/engine
            Reporter: Alex Mantaut


Hash seems to keep a pointer to the keys of the elements it stores.Right now 
that memory is managed by the caller of the method... In some cases it causes a 
memory leak, but as the key memory is external to the hash it is a potential 
segfault (I think this could be related to other existing segfaults which are 
difficult to identify)

I proposed a patch to create a copy of the key for the hash to use (the hash 
releases that memory automatically when freed)...

I looked trough all the code to correct the calls to axutil_hash_set() in order 
to unify the memory management, and runned all the samples to check it worked 
correctly (I know hash it's used in a lot of places)

Please review the patch to see if any changes need to be done on it...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to