Hi,
Looks that staff code not properly handles iterating over some lists/structures.
[1st case]
Method: axiom_attribute_t* DataObject::GetAxiomAttributeByLocalName(const char *szLocalName) const
It uses axutil_hash_first and axutil_hash_next to iterate over attributes.
As long as you don't break for loop everything is okey.
If you do then you will have memory leak. It is because
axutil_hash_next releases axutil_hash_index_t only when it reaches end of hash list.
See axis2c code of AXIS2_EXTERN axutil_hash_index_t *AXIS2_CALL axutil_hash_next(const axutil_env_t *env, axutil_hash_index_t *hi)
In this case, when the for loop is being broken before iterator end, I have to manually release hash iterator with use of AXIS2_FREE(m_pEnv->allocator, pIndex)
[2nd case]
The same problem is when you use DataObject::AttributeBegin(), DataObject::AttributeEnd() and break a loop because it uses the same implementation scheme.
Regards,
Mike