Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Ubuntu
Description
<snippet>
AXIS2_EXTERN
axis2_status_t axis2_svc_client_remove_all_headers(
axis2_svc_client_t* svc_client,
const axutil_env_t* env)
</snippet>
This function does not take responsibility for the memory allocated to the pointers passed to it. In addition, the memory passed to the function axis2_svc_client_add_header through the parameter header is not de-allocated by this function (axis2_svc_client_remove_all_headers). This can create a possible memory leak. When in used in conjunction with a call to axis2_svc_client_send_receive_non_blocking, this is not a problem as this function will clean up the headers itself (this is assumed, since when you free the header nodes, an access violations occur when the SOAP message is sent and the calling function tries to free the SOAP message data, i.e. the header nodes).
Solution: Document memory ownership for parameters and return value. Investigate potential memory leak.