Revision: 1878
http://iterm.svn.sourceforge.net/iterm/?rev=1878&view=rev
Author: delx
Date: 2009-10-19 02:45:25 +0000 (Mon, 19 Oct 2009)
Log Message:
-----------
Fixed memory leak on error conditions in PTYTask
Modified Paths:
--------------
trunk/PTYTask.m
Modified: trunk/PTYTask.m
===================================================================
--- trunk/PTYTask.m 2009-10-12 02:03:45 UTC (rev 1877)
+++ trunk/PTYTask.m 2009-10-19 02:45:25 UTC (rev 1878)
@@ -198,7 +198,7 @@
while(task = [iter nextObject]) {
int fd = [task fd];
if(fd < 0)
- continue;
+ goto breakloop;
if(fd > highfd)
highfd = fd;
if([task wantsRead])
@@ -213,7 +213,7 @@
switch(errno) {
case EAGAIN:
case EINTR:
- continue;
+ goto breakloop;
default:
NSLog(@"Major fail! %s", strerror(errno));
exit(1);
@@ -233,7 +233,7 @@
while(task = [iter nextObject]) {
int fd = [task fd];
if(fd < 0)
- continue;
+ goto breakloop;
if(FD_ISSET(fd, &rfds))
[task processRead];
if(FD_ISSET(fd, &wfds))
@@ -242,6 +242,7 @@
[task brokenPipe];
}
+ breakloop:
[innerPool drain];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|