
This patch prevents some file handles from accidentally being closed. 

Index: cmds.c
===================================================================
RCS file: socks5/clients/ftp/ftp.c,v
retrieving revision 1.9.4.4
retrieving revision 1.9.4.7
diff -c -r1.9.4.4 -r1.9.4.7
*** ftp.c	1999/07/23 14:38:58	1.9.4.4
--- ftp.c	2000/02/24 15:28:03	1.9.4.7
***************
*** 913,918 ****
--- 913,922 ----
      if (closefunc != NULL)
  	(*closefunc)(fin);
      fclose(dout);
+     if(data >= 0) {
+ 	close(data);
+ 	data = -1;
+     }
      getreply(0);
      Signal(SIGINT, oldintr);
      if (oldintp)
***************
*** 1252,1257 ****
--- 1256,1265 ----
  
      gettimeofday(&stop, (struct timezone *)0);
      fclose(din);
+     if(data >= 0) {
+ 	close(data);
+ 	data = -1;
+     }
      getreply(0);
  
