summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorgpalmer <gpalmer@FreeBSD.org>1996-06-03 21:35:21 +0000
committergpalmer <gpalmer@FreeBSD.org>1996-06-03 21:35:21 +0000
commitf41bdecc32ca54c9a849e93b23bf00d89c8e048c (patch)
tree4d7ff0ff908fbb9644dda8c7ea17b67d0ab6c5d5 /usr.sbin/ppp
parent4ef8e1cd88abaf0b2edffbd28bda6ac0f4358e25 (diff)
downloadFreeBSD-src-f41bdecc32ca54c9a849e93b23bf00d89c8e048c.zip
FreeBSD-src-f41bdecc32ca54c9a849e93b23bf00d89c8e048c.tar.gz
Close a file descriptor leak. Possibly closes PR #1212
Diffstat (limited to 'usr.sbin/ppp')
-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 9d0c930..e67a6a2 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.
*/
OpenPOWER on IntegriCloud