farmisen / iphonefrotz

Automatically exported from code.google.com/p/iphonefrotz
Other
0 stars 0 forks source link

Leaked NSString* (currentDir) #192

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The FtpConnection.m method "initWithAsyncSocket:forServer:" leaks an NSString 
on line 46.

The call to 'server.baseDir copy' returns a retained object, and the call to 
"self.currentDir" automatically retains this object again.

To fix:

Link:FTPServLib brent$ svn diff FtpConnection.m
Index: FtpConnection.m
===================================================================
--- FtpConnection.m (revision 264)
+++ FtpConnection.m (working copy)
@@ -43,7 +43,7 @@
        dataPort=2001;
        transferMode = pasvftp;
        queuedData = [[ NSMutableArray alloc ] init ];      // A buffer for sending data when the connection isn't quite up yet
-       self.currentDir = [ server.baseDir copy];       // the working directory for this 
connection, Starts in the directory the server is set to.  set chroot=true in 
server code to sandbox in
+       currentDir = [ server.baseDir copy];            // the working directory for this 
connection, Starts in the directory the server is set to.  set chroot=true in 
server code to sandbox in
        currentFile = nil;  
        currentFileHandle = nil;                // not saving to a file yet
        rnfrFilename = nil; 
Link:FTPServLib brent$ 

Original issue reported on code.google.com by bfulg...@gmail.com on 23 Sep 2012 at 8:23

GoogleCodeExporter commented 9 years ago
Thanks for reporting this.

Original comment by spath...@gmail.com on 23 Sep 2012 at 8:30

GoogleCodeExporter commented 9 years ago
svn -r271

Original comment by spath...@gmail.com on 10 Oct 2012 at 1:17

GoogleCodeExporter commented 9 years ago
Fixed in 1.6 on App Store.

Original comment by spath...@gmail.com on 23 Oct 2012 at 1:45