From 98321e0139af73928307da87ed31245b858e86d0 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Tue, 6 Jul 2010 22:29:50 +0000 Subject: Fix various memory leaks as a result of static analysis. --- Source/SPCSVExporter.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/SPCSVExporter.m') diff --git a/Source/SPCSVExporter.m b/Source/SPCSVExporter.m index 49d6ade6..40feadf9 100644 --- a/Source/SPCSVExporter.m +++ b/Source/SPCSVExporter.m @@ -186,9 +186,9 @@ [queryResult setReturnDataAsStrings:YES]; if ([queryResult numOfRows]) { - tableDetails = [[NSDictionary alloc] initWithDictionary:[queryResult fetchRowAsDictionary]]; + id object = [[[NSDictionary alloc] initWithDictionary:[queryResult fetchRowAsDictionary]] objectForKey:@"Create View"]; - tableDetails = [[NSDictionary alloc] initWithDictionary:([tableDetails objectForKey:@"Create View"]) ? [[self csvTableData] informationForView:[self csvTableName]] : [[self csvTableData] informationForTable:[self csvTableName]]]; + tableDetails = [[NSDictionary alloc] initWithDictionary:(object) ? [[self csvTableData] informationForView:[self csvTableName]] : [[self csvTableData] informationForTable:[self csvTableName]]]; } // Retrieve the table details via the data class, and use it to build an array containing column numeric status -- cgit v1.2.3