Skip to content

Commit

Permalink
Don't adopt result of NSURLSession.sessionWithConfiguration
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=263501

Reviewed by Chris Dumez.

If it were ever released, it would cause memory corruption.
It's not, but still not good practice.

* Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm:
(WebKit::PCM::statelessSessionWithoutRedirects):

Canonical link: https://commits.webkit.org/269631@main
  • Loading branch information
achristensen07 committed Oct 21, 2023
1 parent 7eeecad commit bfc8bf8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece
configuration.URLCache = nil;
configuration.HTTPCookieStorage = nil;
configuration._shouldSkipPreferredClientCertificateLookup = YES;
return adoptNS([NSURLSession sessionWithConfiguration:configuration delegate:delegate.get().get() delegateQueue:[NSOperationQueue mainQueue]]);
return [NSURLSession sessionWithConfiguration:configuration delegate:delegate.get().get() delegateQueue:[NSOperationQueue mainQueue]];
}();
return session.get().get();
}
Expand Down

0 comments on commit bfc8bf8

Please sign in to comment.