diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-03-15 16:59:46 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-03-15 16:59:46 +0000 |
commit | acaf2501c6ff4746c7ce7dd33b8d33fee30b0fb7 (patch) | |
tree | 42a9e59070e7dc5eb1852cf1229e812333222b76 /usr.sbin | |
parent | de53c88405bdbf1bc06322caa373ea5be65809c9 (diff) |
First close() than unlink().
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ospfd/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/control.c b/usr.sbin/ospfd/control.c index aacd4c0fffa..a566aed0895 100644 --- a/usr.sbin/ospfd/control.c +++ b/usr.sbin/ospfd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.6 2005/03/14 18:21:29 norby Exp $ */ +/* $OpenBSD: control.c,v 1.7 2005/03/15 16:59:45 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -74,8 +74,8 @@ control_init(void) if (chmod(OSPFD_SOCKET, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) == -1) { log_warn("control_init: chmod"); - (void)unlink(OSPFD_SOCKET); close(fd); + (void)unlink(OSPFD_SOCKET); return (-1); } |