[Olsr-cvs] olsrd-current/src/bsd net.c,1.27,1.28

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


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

Modified Files:
	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.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** net.c	7 Jan 2006 08:16:22 -0000	1.27
--- net.c	5 Nov 2006 23:03:56 -0000	1.28
***************
*** 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