From 95398cd26fad4753e72b10e1394c0b8477cac3f8 Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Mon, 10 Oct 2011 09:28:41 -0700 Subject: [PATCH] Fixed a no-autorelease-pool leak. --- SUPipedUnarchiver.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SUPipedUnarchiver.m b/SUPipedUnarchiver.m index 3a2e4cf3..5c82dbc8 100644 --- a/SUPipedUnarchiver.m +++ b/SUPipedUnarchiver.m @@ -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