Fix analyzer findings

This commit is contained in:
Jonathan Schleifer 2017-10-15 17:04:58 +02:00
parent 57c875987c
commit 9d8e6f6761
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
4 changed files with 24 additions and 6 deletions

View file

@ -46,7 +46,7 @@ static NSString *aboutHTMLTemplate =
@" scrypt-pwgen {version}"
@"</div>"
@"<div id='copyright'>"
@" Copyright © 2016, Jonathan Schleifer"
@" Copyright © 2016 - 2017, Jonathan Schleifer"
@"</div>"
@"<p name='free_software'>"
@" scrypt-pwgen is free software and the source code is available at "
@ -62,6 +62,8 @@ static NSString *aboutHTMLTemplate =
@implementation AboutController
- (void)viewDidLoad
{
[super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = NO;
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

View file

@ -23,4 +23,10 @@
#import "AppDelegate.h"
@implementation AppDelegate
- (void)dealloc
{
[_window release];
[super dealloc];
}
@end

View file

@ -30,15 +30,18 @@
@implementation MainViewController
- (void)viewDidLoad
{
[super viewDidLoad];
_siteStorage = [[SiteStorage alloc] init];
[self reset];
}
- (void)dealloc
{
[_siteStorage release];
[_tableView release];
[_sites release];
[_siteStorage release];
[_searchBar release];
[_tableView release];
[super dealloc];
}

View file

@ -58,15 +58,20 @@ clearNSMutableString(NSMutableString *string)
[_lengthField release];
[_legacySwitch release];
[_passphraseField release];
[_mainViewController release];
[super dealloc];
}
- (void)viewWillAppear: (BOOL)animated
{
SiteStorage *siteStorage = self.mainViewController.siteStorage;
NSIndexPath *indexPath =
self.mainViewController.tableView.indexPathForSelectedRow;
SiteStorage *siteStorage;
NSIndexPath *indexPath;
[super viewWillAppear: animated];
siteStorage = self.mainViewController.siteStorage;
indexPath = self.mainViewController.tableView.indexPathForSelectedRow;
[_name release];
_name = [self.mainViewController.sites[indexPath.row] retain];
@ -83,6 +88,8 @@ clearNSMutableString(NSMutableString *string)
- (void)viewDidAppear: (BOOL)animated
{
[super viewDidAppear: animated];
[self.passphraseField becomeFirstResponder];
}