[Olsr-cvs] olsrd-current/src/linux net.c,1.30,1.31
Bernd Petrovitsch
(spam-protected)
Mon Nov 6 00:03:58 CET 2006
Update of /cvsroot/olsrd/olsrd-current/src/linux
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32294/src/linux
Modified Files:
net.c
Log Message:
* killed file descriptor leaks
Index: net.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/linux/net.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** net.c 7 Jan 2006 08:16:24 -0000 1.30
--- net.c 5 Nov 2006 23:03:56 -0000 1.31
***************
*** 435,438 ****
--- 435,439 ----
{
perror("SO_REUSEADDR failed");
+ close(sock);
return (-1);
}
***************
*** 443,446 ****
--- 444,448 ----
fprintf(stderr, "Error connecting %d - %s\n", errno, strerror(errno));
printf("connection refused\n");
+ close(sock);
return (-1);
}
***************
*** 488,491 ****
--- 490,494 ----
{
perror("SO_REUSEADDR failed");
+ close(sock);
return (-1);
}
***************
*** 521,524 ****
--- 524,528 ----
fprintf(stderr, "Could not bind socket to device... exiting!\n\n");
syslog(LOG_ERR, "Could not bind socket to device... exiting!\n\n");
+ close(sock);
return -1;
}
***************
*** 607,610 ****
--- 611,615 ----
{
perror("SO_REUSEADDR failed");
+ close(sock);
return (-1);
}
***************
*** 620,623 ****
--- 625,629 ----
fprintf(stderr, "Could not bind socket to device... exiting!\n\n");
syslog(LOG_ERR, "Could not bind socket to device... exiting!\n\n");
+ close(sock);
return -1;
}
More information about the Olsr-cvs
mailing list