Fixed a no-autorelease-pool leak.

This commit is contained in:
Andy Matuschak committed 2011-10-10 09:28:56 -07:00
1 parent 01e8cf90c6
commit 95398cd26f
1 file changed
+3 -2
+3 -2
View File
@@ -48,11 +48,12 @@
{
// *** GETS CALLED ON NON-MAIN THREAD!!!
SULog(@"Extracting %@ using '%@'",archivePath,command);
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
FILE *fp = NULL, *cmdFP = NULL;
SULog(@"Extracting %@ using '%@'",archivePath,command);
// Get the file size.
#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
NSNumber *fs = [[[NSFileManager defaultManager] fileAttributesAtPath:archivePath traverseLink:NO] objectForKey:NSFileSize];
@@ -98,7 +99,7 @@ reportError:
finally:
if (fp)
fclose(fp);
[pool drain];
[pool release];
}
- (void)extractTAR