Skip to content

Commit

Permalink
Fixed memory-leak warnings found by static analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
radiantcapsule committed Sep 5, 2011
1 parent fbf07b1 commit ab1e0af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OAMutableURLRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ - (void)_generateTimestamp {
- (void)_generateNonce {
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, theUUID);
NSMakeCollectable(theUUID);
[NSMakeCollectable(theUUID) autorelease];
if (nonce) {
CFRelease(nonce);
}
Expand Down
6 changes: 3 additions & 3 deletions OATokenManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ - (void)exchangeToken

- (void)accessTokenReceived:(OACall *)call body:(NSString *)body
{
OAToken *token = [[OAToken alloc] initWithHTTPResponseBody:body];
OAToken *token = [[[OAToken alloc] initWithHTTPResponseBody:body] autorelease];
[self setAccessToken:token];
}

Expand Down Expand Up @@ -361,10 +361,10 @@ - (void)dispatch {
- (void)fetchData:(NSString *)aURL method:(NSString *)aMethod parameters:(NSArray *)theParameters
files:(NSDictionary *)theFiles finished:(SEL)didFinish delegate:(NSObject*)aDelegate {

OACall *call = [[OACall alloc] initWithURL:[NSURL URLWithString:aURL]
OACall *call = [[[OACall alloc] initWithURL:[NSURL URLWithString:aURL]
method:aMethod
parameters:theParameters
files:theFiles];
files:theFiles] autorelease];
NSLog(@"Received request for: %@", aURL);
[self enqueue:call selector:didFinish];
if (aDelegate) {
Expand Down

0 comments on commit ab1e0af

Please sign in to comment.