Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.2
-
None
-
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.