Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-751

Major Memory leak in http_transport_utils.c with REST

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • transport/http, xml/om, xml/soap
    • 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

      Attachments

        1. diff.txt
          0.5 kB
          Senaka Fernando

        Activity

          People

            damitha Damitha N.M. Kumarage
            senakafdo Senaka Fernando
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: