diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-02-25 23:00:24 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-02-25 23:00:24 +0000 |
commit | 3d900675b99647bf5000f0930a1a24073adbd7f4 (patch) | |
tree | 4d6a1cfb4db2d0199d1f53c273ec29594ffd6118 /usr.sbin | |
parent | 9838c3a81677b7d18bbfe2c29c8a0f689a6b75b5 (diff) |
unlink() control socket in error path. Spotted by Theo.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/control.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index cae0e203533..7553fe8c474 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.41 2004/12/23 17:55:58 henning Exp $ */ +/* $OpenBSD: control.c,v 1.42 2005/02/25 23:00:23 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -71,6 +71,7 @@ control_init(void) if (chmod(SOCKET_NAME, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) == -1) { log_warn("control_init chmod"); close(fd); + (void)unlink(SOCKET_NAME); return (-1); } |