Skip to contentSkip to conversation

conga/ricci common/executils.cpp ricci/Auth.cpp

Cluster-devel [email protected] 1 participant 1 message Aug 12, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-08-12 00:38:36

Modified files:
ricci/common : executils.cpp
ricci/ricci : Auth.cpp

Log message:
ricci: fd leak

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/common/executils.cpp.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/ricci/Auth.cpp.diff?cvsroot=cluster&r1=1.3&r2=1.4

ricci/common/executils.cpp +1 -1
@@ -102,7 +102,7 @@
     
     // close open fds
     for (unsigned int i=3; i<__FD_SETSIZE; i++)
-      close(i);
+      close_fd(i);
     
     // restore signals
     for (int x = 1; x < _NSIG; x++)
ricci/ricci/Auth.cpp +2 -2
@@ -114,10 +114,10 @@
       pass = pass.substr(size, pass.npos);
     } while (!pass.empty());
   } catch ( ... ) {
-    close_fd(_stdin_pipe[0]);
+    close_fd(_stdin_pipe[1]);
     throw;
   }
-  close_fd(_stdin_pipe[0]);
+  close_fd(_stdin_pipe[1]);
   
   bool success = false;
   int ret, status;