diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-04-15 15:31:56 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-04-15 15:31:56 +0000 |
commit | 03f0fb88a3788b14da4c011f6e5ae6d65e0da840 (patch) | |
tree | e8ab1fd47d64161e11a2b091a59009b0dd63f13d | |
parent | 6636107d935621d3aea59eae1cd1da0fa644801b (diff) |
Fix fd leak in error case.
OK michele@
-rw-r--r-- | usr.sbin/ldpd/packet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c index 7e08cdf125b..7217553f515 100644 --- a/usr.sbin/ldpd/packet.c +++ b/usr.sbin/ldpd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.6 2010/04/15 15:04:23 claudio Exp $ */ +/* $OpenBSD: packet.c,v 1.7 2010/04/15 15:31:55 claudio Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -287,6 +287,7 @@ session_accept(int fd, short event, void *bula) if ((iface = session_find_iface(xconf, src.sin_addr)) == NULL) { log_debug("sess_recv_packet: cannot find a matching interface"); + close(newfd); return; } |