aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorGary Palmer <gpalmer@FreeBSD.org>1996-06-03 21:35:21 +0000
committerGary Palmer <gpalmer@FreeBSD.org>1996-06-03 21:35:21 +0000
commit4ecb9b64f0800d2aa122d82934b0546cac7ff280 (patch)
tree4d7ff0ff908fbb9644dda8c7ea17b67d0ab6c5d5 /usr.sbin
parent70013b57390c2add9bb029d325171ecb3cff1b71 (diff)
downloadsrc-4ecb9b64f0800d2aa122d82934b0546cac7ff280.tar.gz
src-4ecb9b64f0800d2aa122d82934b0546cac7ff280.zip
Close a file descriptor leak. Possibly closes PR #1212
Notes
Notes: svn path=/head/; revision=16101
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/os.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ppp/os.c b/usr.sbin/ppp/os.c
index 9d0c9304f8ef..e67a6a2ee08d 100644
--- a/usr.sbin/ppp/os.c
+++ b/usr.sbin/ppp/os.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: os.c,v 1.5 1996/05/11 20:48:37 phk Exp $
+ * $Id: os.c,v 1.6 1996/05/13 07:20:11 phk Exp $
*
*/
#include "fsm.h"
@@ -92,8 +92,10 @@ int updown;
/*
* If given addresses are alreay set, then ignore this request.
*/
- if (oldmine.s_addr == myaddr.s_addr && oldhis.s_addr == hisaddr.s_addr)
+ if (oldmine.s_addr == myaddr.s_addr && oldhis.s_addr == hisaddr.s_addr) {
+ close(s);
return(0);
+ }
/*
* If different address has been set, then delete it first.
*/