Close some file descriptors.
Pointed at by: Ruslan Ermilov <ru@ucb.crimea.ua>
This commit is contained in:
parent
368da0a94a
commit
0f8037a9db
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=36228
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bundle.c,v 1.1.2.85 1998/05/16 23:47:20 brian Exp $
|
||||
* $Id: bundle.c,v 1.1.2.86 1998/05/17 10:16:14 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -163,6 +163,7 @@ bundle_CleanInterface(const struct bundle *bundle)
|
||||
"bundle_CleanInterface: Can't get dst for %s on %s !\n",
|
||||
inet_ntoa(((struct sockaddr_in *)&ifra.ifra_addr)->sin_addr),
|
||||
bundle->ifp.Name);
|
||||
close(s);
|
||||
return 0;
|
||||
}
|
||||
ifra.ifra_broadaddr = ifrq.ifr_dstaddr;
|
||||
@ -172,9 +173,11 @@ bundle_CleanInterface(const struct bundle *bundle)
|
||||
"bundle_CleanInterface: Can't delete %s address on %s !\n",
|
||||
inet_ntoa(((struct sockaddr_in *)&ifra.ifra_addr)->sin_addr),
|
||||
bundle->ifp.Name);
|
||||
close(s);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
close(s);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ipcp.c,v 1.50.2.51 1998/05/06 23:50:14 brian Exp $
|
||||
* $Id: ipcp.c,v 1.50.2.52 1998/05/15 23:58:23 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o More RFC1772 backwoard compatibility
|
||||
@ -651,11 +651,9 @@ ipcp_CleanInterface(struct ipcp *ipcp)
|
||||
me->sin_len = peer->sin_len = sizeof(struct sockaddr_in);
|
||||
me->sin_addr = ipcp->my_ifip;
|
||||
peer->sin_addr = ipcp->peer_ifip;
|
||||
if (ID0ioctl(s, SIOCDIFADDR, &ifra) < 0) {
|
||||
if (ID0ioctl(s, SIOCDIFADDR, &ifra) < 0)
|
||||
log_Printf(LogERROR, "ipcp_CleanInterface: ioctl(SIOCDIFADDR): %s\n",
|
||||
strerror(errno));
|
||||
close(s);
|
||||
}
|
||||
ipcp->my_ifip.s_addr = ipcp->peer_ifip.s_addr = INADDR_ANY;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: modem.c,v 1.77.2.69 1998/05/12 17:34:29 brian Exp $
|
||||
* $Id: modem.c,v 1.77.2.70 1998/05/13 19:06:25 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -401,6 +401,7 @@ OpenConnection(const char *name, char *host, char *port)
|
||||
}
|
||||
if (connect(sock, (struct sockaddr *)&dest, sizeof dest) < 0) {
|
||||
log_Printf(LogWARN, "%s: connect: %s\n", name, strerror(errno));
|
||||
close(sock);
|
||||
return (-1);
|
||||
}
|
||||
return (sock);
|
||||
|
Loading…
Reference in New Issue
Block a user