pokeb/asi-http-request — Issue #269: possible memory leak in ASIHTTPRequest.m
Author: minorblend
Created: 2011-10-12 16:37:54+00:00
State: open

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.

```
if([[[[self url] scheme] lowercaseString] isEqualToString:@"https"]) {

// Tell CFNetwork not to validate SSL certificates
if (![self validatesSecureCertificate]) {
// see: http://iphonedevelopment.blogspot.com/2010/05/nsstream-tcp-and-ssl.html

NSDictionary *sslProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsExpiredCertificates,
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsAnyRoot,
[NSNumber numberWithBool:NO], kCFStreamSSLValidatesCertificateChain,
kCFNull,kCFStreamSSLPeerName,
nil];

CFReadStreamSetProperty((CFReadStreamRef)[self readStream],
kCFStreamPropertySSLSettings,
(CFTypeRef)sslProperties);
}
```