Permalink
Browse files

Fix memory leaks.

  • Loading branch information...
stuconnolly committed May 28, 2014
1 parent 8e4e360 commit bc2456524497b02794402bb1d3be9ba9bd4f1ae9
Showing with 9 additions and 5 deletions.
  1. +3 −3 Source/SPExportInitializer.m
  2. +6 −2 Source/SPViewCopy.m
@@ -451,11 +451,11 @@ - (void)exportTables:(NSArray *)exportTables orDataArray:(NSArray *)dataArray
if ([problemFiles count] > 0) {
[self errorCreatingExportFileHandles:problemFiles];
}
else {
[problemFiles release];
else {
[self startExport];
}
[problemFiles release];
}
/**
@@ -45,14 +45,18 @@ - (BOOL)moveView:(NSString *)view from:(NSString *)sourceDatabase to:(NSString *
NSMutableString *createStatement = [[NSMutableString alloc] initWithString:[self _createViewStatementFor:view inDatabase:sourceDatabase]];
NSString *search = [NSString stringWithFormat:@"VIEW %@", [view backtickQuotedString]];
NSRange range = [createStatement rangeOfString:search];
if (range.location != NSNotFound) {
NSUInteger replaced = [createStatement replaceOccurrencesOfString:search withString:[NSString stringWithFormat:@"VIEW %@.%@", [targetDatabase backtickQuotedString], [view backtickQuotedString]] options:0 range:range];
if (replaced != 1) return NO;
if (replaced != 1) {
[createStatement release];
return NO;
}
// Replace all occurrences of the old database name
[createStatement replaceOccurrencesOfString:[sourceDatabase backtickQuotedString]

0 comments on commit bc24565

Please sign in to comment.