summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2008-01-29 16:32:30 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2008-01-29 16:32:30 +0000
commit0064a9decefb16636e8a16b1b24c0d8889281713 (patch)
treee6a5ac4c9caf82c98b36a4f9a2301e08f991e1bf /usr.sbin/relayd
parent8a9ab5d2b77b4dee07dc897da5cce4803629b642 (diff)
When relayd(8) accepts control it creates `connfd' descriptor with accept
function. Close it when ctl_conn allocation fails. From Igor Zinovik (zinovik at cs.karelia dot ru)
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r--usr.sbin/relayd/control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/relayd/control.c b/usr.sbin/relayd/control.c
index d45706740f7..e0790ed3dc7 100644
--- a/usr.sbin/relayd/control.c
+++ b/usr.sbin/relayd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.23 2007/12/08 20:36:36 pyr Exp $ */
+/* $OpenBSD: control.c,v 1.24 2008/01/29 16:32:29 reyk Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -142,6 +142,7 @@ control_accept(int listenfd, short event, void *arg)
session_socket_blockmode(connfd, BM_NONBLOCK);
if ((c = malloc(sizeof(struct ctl_conn))) == NULL) {
+ close(connfd);
log_warn("control_accept");
return;
}