{"comment":{"created_at":"2011-10-21T18:58:01Z","body":"Just found this via Google search because my Analyzer also kicked that message out.  I tried to read through the Apple docs to see if `CFReadStreamSetProperty` increments the retain count on the third parameter, but I'm not finding anything.  I put a pair of `NSLog(@\"retain count=%d\", [sslProperties retainCount]);` statements around the `CFReadStreamSetProperty` call and I could see the retain count was in fact incremented at runtime.\r\n\r\nSo, I changed the alloc and init line to `[NSDictionary dictionaryWithObjectsAndKeys:` and I'm not seeing an issue yet.  This does in fact appear to be a real leak and not just a potential one.  You'll only encounter it if you use https and you've instructed ASIHTTPRequest to not validate SSL certificates.","updated_at":"2011-10-21T18:58:01Z","url":"https://api.github.com/repos/pokeb/asi-http-request/issues/comments/2484939","id":2484939,"user":{"avatar_url":"https://secure.gravatar.com/avatar/5519784c47b486d3f85bf5049f3cc83d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5519784c47b486d3f85bf5049f3cc83d","url":"https://api.github.com/users/bmauter","id":1143804,"login":"bmauter"}},"action":"created","issue":{"number":269,"created_at":"2011-10-12T16:37:54Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"in method (void)startRequest of ASIHTTPRequest class, at line 7, sslProperties is allocated but not released (nor autorelease). Xcode analyze warns that it'll cause memory leak.\r\n\r\n```\r\n  if([[[[self url] scheme] lowercaseString] isEqualToString:@\"https\"]) {       \r\n    \r\n    // Tell CFNetwork not to validate SSL certificates\r\n    if (![self validatesSecureCertificate]) {\r\n      // see: http://iphonedevelopment.blogspot.com/2010/05/nsstream-tcp-and-ssl.html\r\n      \r\n      NSDictionary *sslProperties = [[NSDictionary alloc] initWithObjectsAndKeys:\r\n                                     [NSNumber numberWithBool:YES], kCFStreamSSLAllowsExpiredCertificates,\r\n                                     [NSNumber numberWithBool:YES], kCFStreamSSLAllowsAnyRoot,\r\n                                     [NSNumber numberWithBool:NO],  kCFStreamSSLValidatesCertificateChain,\r\n                                     kCFNull,kCFStreamSSLPeerName,\r\n                                     nil];\r\n      \r\n      CFReadStreamSetProperty((CFReadStreamRef)[self readStream], \r\n                              kCFStreamPropertySSLSettings, \r\n                              (CFTypeRef)sslProperties);\r\n    } \r\n```","comments":1,"title":"possible memory leak in ASIHTTPRequest.m","updated_at":"2011-10-21T18:58:01Z","url":"https://api.github.com/repos/pokeb/asi-http-request/issues/269","id":1889194,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/5ee244f4b91255420610f1dfba324846?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5ee244f4b91255420610f1dfba324846","url":"https://api.github.com/users/minorblend","id":591914,"login":"minorblend"},"html_url":"https://github.com/pokeb/asi-http-request/issues/269","labels":[],"state":"open"},"legacy":{"issue_id":1889194,"comment_id":2484939}}