Skip to content

Commit

Permalink
Fix some issues brought up by the clang static analyzer.
Browse files Browse the repository at this point in the history
  • Loading branch information
mstroeck committed Jan 23, 2012
1 parent de4df4d commit 25894bf
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
7 changes: 5 additions & 2 deletions ArticleListView.m
Expand Up @@ -297,11 +297,14 @@ -(NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *
if ([newDefaultMenu count] > 0)
defaultMenuItems = [newDefaultMenu autorelease];
else
{
defaultMenuItems = nil;
}
[newDefaultMenu release];
}
}

// Return the default menu items.
return defaultMenuItems;
return defaultMenuItems;
}

/* initTableView
Expand Down
3 changes: 3 additions & 0 deletions BitlyAPIHelper.m
Expand Up @@ -67,10 +67,13 @@ - (NSString*)shortenURL: (NSString*)longURL
if ((subtree = [responseParser treeByPath:@"bitly/results/nodeKeyVal/shortUrl"]) != nil)
{
[responseParser release];
[request release];
return [subtree valueOfElement];
}
[request release];
[responseParser release];
}
[request release];
// TODO: Present error-message to the user?
NSLog(@"URL shortening with bit.ly failed!");
NSBeep();
Expand Down
3 changes: 2 additions & 1 deletion GoogleReader.m
Expand Up @@ -237,7 +237,8 @@ -(ASIHTTPRequest*)refreshFeed:(Folder*)thisFolder shouldIgnoreArticleLimit:(BOOL
// Add to count of new articles so far
countOfNewArticles += newArticlesFromFeed;
*/
}
[dict release];
}


}];
Expand Down
4 changes: 2 additions & 2 deletions PluginManager.m
Expand Up @@ -351,7 +351,7 @@ -(IBAction)pluginInvocator:(id)sender
NSString * shortURL = [bitlyHelper shortenURL:[theView viewLink]];

[urlString replaceString:@"$ArticleLink$" withString:shortURL];
[BitlyAPIHelper release];
[bitlyHelper release];
}
else
{
Expand All @@ -375,7 +375,7 @@ -(IBAction)pluginInvocator:(id)sender

// If URL shortening fails, we fall back to the long URL.
[urlString replaceString:@"$ArticleLink$" withString:(shortURL ? shortURL : [currentMessage link])];
[BitlyAPIHelper release];
[bitlyHelper release];
}
else
{
Expand Down
1 change: 1 addition & 0 deletions XMLParser.m
Expand Up @@ -485,6 +485,7 @@ +(NSCalendarDate *)getDateFromString:(NSString *)dateString
return date;
}
NSLog(@"Conversion error: %@",dateString);
[dateFormat release];
return date;
}

Expand Down

0 comments on commit 25894bf

Please sign in to comment.