Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Possible memory leak #284

wants to merge 1 commit into from

3 participants


Reported by static analyzer. Shouldn't break things as much as I've tried.


I would like to second this fix; the sslProperties object created if a clientCertificateIdentity is present in the startRequest method creates an autoreleased NSDictionary object, whereas the one created if no valid SSL Certificate is present is not autoreleased.

I tested this exact same change here on my side and it worked flawlessly.


Thanks for suggesting this fix - several different fixes for this had built up in the pull queue, so I've applied one and am closing the rest.

@jogu jogu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 8, 2011
  1. @pypt
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 Classes/ASIHTTPRequest.m
4 Classes/ASIHTTPRequest.m
@@ -1204,12 +1204,12 @@ - (void)startRequest
if (![self validatesSecureCertificate]) {
// see:
- NSDictionary *sslProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
+ NSDictionary *sslProperties = [[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsExpiredCertificates,
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsAnyRoot,
[NSNumber numberWithBool:NO], kCFStreamSSLValidatesCertificateChain,
- nil];
+ nil] autorelease];
CFReadStreamSetProperty((CFReadStreamRef)[self readStream],
Something went wrong with that request. Please try again.