[Olsr-cvs] olsrd-current/src/bsd net.c,1.26,1.26.2.1

Bernd Petrovitsch (spam-protected)
Mon Nov 6 00:03:28 CET 2006


Update of /cvsroot/olsrd/olsrd-current/src/bsd
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32293/src/bsd

Modified Files:
      Tag: olsrd_04
	net.c 
Log Message:
* killed file descriptor leaks

Index: net.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/bsd/net.c,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C2 -d -r1.26 -r1.26.2.1
*** net.c	28 Aug 2005 19:30:29 -0000	1.26
--- net.c	5 Nov 2006 23:03:26 -0000	1.26.2.1
***************
*** 291,294 ****
--- 291,295 ----
      {
        perror("SO_REUSEADDR failed");
+       close(sock);
        return (-1);
      }
***************
*** 299,302 ****
--- 300,304 ----
        fprintf(stderr, "Error connecting %d - %s\n", errno, strerror(errno));
        printf("connection refused\n");
+       close(sock);
        return (-1);
      }
***************
*** 333,336 ****
--- 335,339 ----
      {
        perror("SO_REUSEADDR failed");
+       close(sock);
        return (-1);
      }
***************
*** 340,343 ****
--- 343,347 ----
      {
        perror("SO_REUSEPORT failed");
+       close(sock);
        return (-1);
      }
***************
*** 346,349 ****
--- 350,354 ----
      {
        perror("IP_RECVIF failed");
+       close(sock);
        return (-1);
      }
***************
*** 404,407 ****
--- 409,413 ----
      {
        perror("SO_REUSEADDR failed");
+       close(sock);
        return (-1);
      }





More information about the Olsr-cvs mailing list