[Olsr-cvs] olsrd-current/src/linux net.c,1.29,1.29.2.1
Bernd Petrovitsch
(spam-protected)
Mon Nov 6 00:03:28 CET 2006
Update of /cvsroot/olsrd/olsrd-current/src/linux
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32293/src/linux
Modified Files:
Tag: olsrd_04
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.29
retrieving revision 1.29.2.1
diff -C2 -d -r1.29 -r1.29.2.1
*** net.c 17 Sep 2005 20:48:50 -0000 1.29
--- net.c 5 Nov 2006 23:03:26 -0000 1.29.2.1
***************
*** 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