Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
Ubuntu 7.10 (Gutsy Gibbon)
Description
We are not freeing the om_builder that we create when using the REST mode within the axis2_http_transport_utils_process_http_post_request() method. This leads to a major memory leak, amounting to somewhere around 26KB (indirect leaks) – according to valgrind when running the echo_rest sample just once. Therefore, I believe this needs a reasonable amount of attention.
Unlike, non-REST invocations where the soap_builder frees the om_builder, in REST as we don't create a soap_builder, the om_builder basically does not get freed.
I have done a modification in http_transport_utils.c, so that if the om_builder is not freed when the soap_builder is null, it will get freed before we leave the axis2_http_transport_utils_process_http_post_request() method block. Therefore, even for a non-REST invocation if the soap_builder has been freed (or if it is null) but, the om_builder is not, the om_builder will automatically get freed within the axis2_http_transport_utils_process_http_post_request() method before we leave the method.
I have tested the modification with all the samples and all were invoked successfully.
Senaka