diff options
author | henning <henning@openbsd.org> | 2008-01-31 12:17:35 +0000 |
---|---|---|
committer | henning <henning@openbsd.org> | 2008-01-31 12:17:35 +0000 |
commit | ac50b3da6afb17363dac0cd05dd97d4a5b6a4546 (patch) | |
tree | 65e118606d6d1ba44f61467600d14fc8360a14fc /usr.sbin/ripd/control.c | |
parent | add prefixes to names of structure elements to make it easier to grep (diff) | |
download | wireguard-openbsd-ac50b3da6afb17363dac0cd05dd97d4a5b6a4546.tar.xz wireguard-openbsd-ac50b3da6afb17363dac0cd05dd97d4a5b6a4546.zip |
do not leak confd on malloc failure in control_accept()
found by Igor Zinovik <zinovik@cs.karelia.ru>
Diffstat (limited to 'usr.sbin/ripd/control.c')
-rw-r--r-- | usr.sbin/ripd/control.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ripd/control.c b/usr.sbin/ripd/control.c index ed28aa95367..78a0b81380b 100644 --- a/usr.sbin/ripd/control.c +++ b/usr.sbin/ripd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.5 2007/10/24 20:20:32 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.6 2008/01/31 12:17:35 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -128,6 +128,7 @@ control_accept(int listenfd, short event, void *bula) if ((c = malloc(sizeof(struct ctl_conn))) == NULL) { log_warn("control_accept"); + close(connfd); return; } |