diff options
Diffstat (limited to 'Frameworks/PostgresKit/Source/FLXPostgresError.m')
-rw-r--r-- | Frameworks/PostgresKit/Source/FLXPostgresError.m | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Frameworks/PostgresKit/Source/FLXPostgresError.m b/Frameworks/PostgresKit/Source/FLXPostgresError.m index 927100f8..31024a92 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresError.m +++ b/Frameworks/PostgresKit/Source/FLXPostgresError.m @@ -97,12 +97,7 @@ _errorPrimaryMessage = [self _extractErrorField:PG_DIAG_MESSAGE_PRIMARY fromResult:result]; _errorDetailMessage = [self _extractErrorField:PG_DIAG_MESSAGE_DETAIL fromResult:result]; _errorMessageHint = [self _extractErrorField:PG_DIAG_MESSAGE_HINT fromResult:result]; - - NSString *statementPosition = [self _extractErrorField:PG_DIAG_STATEMENT_POSITION fromResult:result]; - - _errorStatementPosition = [statementPosition integerValue]; - - [statementPosition release]; + _errorStatementPosition = [[self _extractErrorField:PG_DIAG_STATEMENT_POSITION fromResult:result] integerValue]; } /** @@ -115,7 +110,7 @@ */ - (NSString *)_extractErrorField:(int)field fromResult:(const PGresult *)result { - return [[NSString alloc] initWithUTF8String:PQresultErrorField(result, field)]; + return [[[NSString alloc] initWithUTF8String:PQresultErrorField(result, field)] autorelease]; } #pragma mark - |