Commit Diff


commit - 9e918e62b0a156e94893341b7bb7eb65ba32aa38
commit + c7a6a5d7fc384a9787efae3d627170f00da8f655
blob - 8bd470f8e2aa8295a69b00ec525e774a76522da2
blob + 2f56167559814abe99ebb6fd27f46a737c72194d
--- main.c
+++ main.c
@@ -136,7 +136,7 @@ struct tcps {
 } *tn1, *tn2, *tnp;
 
 
-static const char rcsid[] = "$Id: main.c,v 1.68 2011/09/22 06:07:54 pbug Exp $";
+static const char rcsid[] = "$Id: main.c,v 1.69 2011/09/22 07:39:37 pbug Exp $";
 
 /* 
  * MAIN - set up arguments, set up database, set up sockets, call mainloop
@@ -839,8 +839,11 @@ main(int argc, char *argv[])
 				close(udp[j]);
 				close(uafd[j]);
 			}
-			close(raw[0]);
-			close(raw[1]);
+
+			if (rflag) {
+				close(raw[0]);
+				close(raw[1]);
+			}
 
 #ifndef __linux__
 			setproctitle("AXFR engine on port %d", axfrport);
@@ -959,6 +962,7 @@ main(int argc, char *argv[])
 				for (j = 0; j < i; j++) {
 					close(tcp[j]);
 					close(udp[j]);
+					close(uafd[j]);
 				}
 				close (sp[1]);