Traffic Server
  1. Traffic Server
  2. TS-826

TSHttpTxnErrorBodySet() can leak memory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
    • Fix Version/s: 3.1.0, 3.0.1
    • Component/s: TS API
    • Labels:
      None

      Description

      TSHttpTxnErrorBodySet() sets HttpSM::t_state.internal_msg_buffer without freeing any old contents in there.
      There can be an error message in that if you have a request with a bad hostname and you let the transaction get past DNS
      lookup. Instead it should free the contents, or there should be another field that it sets and nothing else does.

      1. ebs.diff
        0.8 kB
        William Bardwell

        Activity

        William Bardwell created issue -
        Leif Hedstrom made changes -
        Field Original Value New Value
        Assignee Leif Hedstrom [ zwoop ]
        Fix Version/s 3.1.0 [ 12315515 ]
        Hide
        William Bardwell added a comment -

        Patch based on what TSHttpTxnServerRequestBodySet does.

        Show
        William Bardwell added a comment - Patch based on what TSHttpTxnServerRequestBodySet does.
        William Bardwell made changes -
        Attachment ebs.diff [ 12483163 ]
        Leif Hedstrom made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Leif Hedstrom made changes -
        Backport to Version 3.0.1 [ 12316365 ]
        Igor Galić made changes -
        Fix Version/s 3.0.1 [ 12316365 ]
        Backport to Version 3.0.1 [ 12316365 ]
        Hide
        Leif Hedstrom added a comment -

        Resolved on both 3.0.x and trunk.

        Show
        Leif Hedstrom added a comment - Resolved on both 3.0.x and trunk.
        Leif Hedstrom made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Leif Hedstrom made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Brian Geffon added a comment - - edited

        Correct me if I'm wrong but with this patch it's still leaking mimetype. See HttpSM::setup_internal_transfer line 5416 which frees internal_msg_buffer_type...it's expected that mimetype was malloced since clearly it's being freed. So that means there is still a memory leak in TSHttpTxnErrorBodySet().

        Show
        Brian Geffon added a comment - - edited Correct me if I'm wrong but with this patch it's still leaking mimetype. See HttpSM::setup_internal_transfer line 5416 which frees internal_msg_buffer_type...it's expected that mimetype was malloced since clearly it's being freed. So that means there is still a memory leak in TSHttpTxnErrorBodySet().
        Hide
        Brian Geffon added a comment -
        Show
        Brian Geffon added a comment - Opened bug https://issues.apache.org/jira/browse/TS-1038
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        13d 5h 45m 1 Leif Hedstrom 20/Jun/11 21:55
        Patch Available Patch Available Resolved Resolved
        24d 17h 3m 1 Leif Hedstrom 15/Jul/11 14:59
        Resolved Resolved Closed Closed
        34d 11h 20m 1 Leif Hedstrom 19/Aug/11 02:19

          People

          • Assignee:
            Leif Hedstrom
            Reporter:
            William Bardwell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development