diff options
author | gpalmer <gpalmer@FreeBSD.org> | 1996-06-03 21:35:21 +0000 |
---|---|---|
committer | gpalmer <gpalmer@FreeBSD.org> | 1996-06-03 21:35:21 +0000 |
commit | f41bdecc32ca54c9a849e93b23bf00d89c8e048c (patch) | |
tree | 4d7ff0ff908fbb9644dda8c7ea17b67d0ab6c5d5 /usr.sbin/ppp/os.c | |
parent | 4ef8e1cd88abaf0b2edffbd28bda6ac0f4358e25 (diff) | |
download | FreeBSD-src-f41bdecc32ca54c9a849e93b23bf00d89c8e048c.zip FreeBSD-src-f41bdecc32ca54c9a849e93b23bf00d89c8e048c.tar.gz |
Close a file descriptor leak. Possibly closes PR #1212
Diffstat (limited to 'usr.sbin/ppp/os.c')
-rw-r--r-- | usr.sbin/ppp/os.c | 6 |
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. */ |