summaryrefslogtreecommitdiff
path: root/usr.sbin/dvmrpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2008-01-31 12:17:36 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2008-01-31 12:17:36 +0000
commit5b4dde59a0b228868613dcc5b164815ca83c085f (patch)
treed554c5f5ea0108c6beebe37dc9d2b22e3a2ac2cf /usr.sbin/dvmrpd
parentac20736c423a4be197e31b7d9daebbe9a4c511a5 (diff)
do not leak confd on malloc failure in control_accept()
found by Igor Zinovik <zinovik@cs.karelia.ru>
Diffstat (limited to 'usr.sbin/dvmrpd')
-rw-r--r--usr.sbin/dvmrpd/control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/dvmrpd/control.c b/usr.sbin/dvmrpd/control.c
index f5825fd3408..6483abc735f 100644
--- a/usr.sbin/dvmrpd/control.c
+++ b/usr.sbin/dvmrpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.3 2007/03/19 10:13:20 henning Exp $ */
+/* $OpenBSD: control.c,v 1.4 2008/01/31 12:17:35 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -129,6 +129,7 @@ control_accept(int listenfd, short event, void *bula)
if ((c = malloc(sizeof(struct ctl_conn))) == NULL) {
log_warn("control_accept");
+ close(connfd);
return;
}