Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CoreFoundation] Fix memory leak in CFProxySupport. #20713

Merged
merged 1 commit into from
Jun 11, 2024

Commits on Jun 10, 2024

  1. [CoreFoundation] Fix memory leak in CFProxySupport.

    The Xcode 16 release notes have this note:
    
        CFNetwork Resolved Issues
    
        * Fixed: CFNetworkExecuteProxyAutoConfigurationScript and
          CFNetworkExecuteProxyAutoConfigurationURL have always returned a +1
          retained CF type object, but the function declarations were not
          decorated with the CF_RETURNS_RETAINED attribute until iOS 18, macOS 15,
          tvOS 18, and visionOS 2.
    
          For C-based languages, the clang static analyzer might note if the
          object is leaked. No source code changes are required, but they are
          encouraged to fix the leak.
    
          For Swift, this changes the return type of these functions from
          Unmanaged<> to the actual CF type returned, which will require a source
          change to fix when compiling with newer SDKs. However, Swift programs
          compiled with older SDKs will continue to work on the new OSes, though
          the returned CF type object will continue to leak as it did prior to
          this change. (126154509)
    
    So update our code accordingly to take into account that
    CFNetworkExecuteProxyAutoConfigurationScript and
    CFNetworkExecuteProxyAutoConfigurationURL return retained objects.
    rolfbjarne committed Jun 10, 2024
    2 Configuration menu
    Copy the full SHA
    2de3a32 View commit details
    Browse the repository at this point in the history