From adebca38bae69db3a54ed3db5c0c7d74f242f3e9 Mon Sep 17 00:00:00 2001 From: Doug Russell Date: Mon, 28 Jan 2013 11:53:47 -0800 Subject: [PATCH] Fix for un-initialized variable error --- SUPipedUnarchiver.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SUPipedUnarchiver.m b/SUPipedUnarchiver.m index 08246647..1d949e3b 100644 --- a/SUPipedUnarchiver.m +++ b/SUPipedUnarchiver.m @@ -51,6 +51,7 @@ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; FILE *fp = NULL, *cmdFP = NULL; + char *oldDestinationString = NULL; SULog(@"Extracting %@ using '%@'",archivePath,command); @@ -67,7 +68,7 @@ fp = fopen([archivePath fileSystemRepresentation], "r"); if (!fp) goto reportError; - char *oldDestinationString = getenv("DESTINATION"); + oldDestinationString = getenv("DESTINATION"); setenv("DESTINATION", [[archivePath stringByDeletingLastPathComponent] fileSystemRepresentation], 1); cmdFP = popen([command fileSystemRepresentation], "w"); size_t written;