Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-688

cocoa: Memory management rules violated by -newProtocolOnTransport:

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.2
    • None
    • Cocoa - Library
    • None
    • Patch Available

    Description

      The standard Cocoa memory management rules are not followed in the implementation/usage of -newProtocolOnTransport:. According to the memory management rules, methods starting with "new" return an owned object, but the current implementation of -[TBinaryProtocol newProtocolOnTransport:] (and its subsequent usage in TSocketServer) returns an autoreleased object instead. The attached patch fixes this, and can be verified by running the Clang Static Analyzer on the code both before and after the patch.

      Attachments

        1. TBinaryProtocol.patch
          1 kB
          Kevin Ballard

        Activity

          People

            kballard Kevin Ballard
            kballard Kevin Ballard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: