gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r21581 - gnunet/src/testing


From: gnunet
Subject: [GNUnet-SVN] r21581 - gnunet/src/testing
Date: Fri, 25 May 2012 16:45:06 +0200

Author: harsha
Date: 2012-05-25 16:45:06 +0200 (Fri, 25 May 2012)
New Revision: 21581

Modified:
   gnunet/src/testing/testing_new.c
Log:
-freeing addrinfo

Modified: gnunet/src/testing/testing_new.c
===================================================================
--- gnunet/src/testing/testing_new.c    2012-05-25 14:41:52 UTC (rev 21580)
+++ gnunet/src/testing/testing_new.c    2012-05-25 14:45:06 UTC (rev 21581)
@@ -228,7 +228,7 @@
     while (pos < 32)
     {
       if (0 == ((xor_image >> pos) & 1U))
-       break;
+       continue;
       open_port = (index * 32) + pos;
       GNUNET_asprintf (&open_port_str, "%u", open_port);
       hint.ai_family = AF_UNSPEC;      /* IPv4 and IPv6 */
@@ -244,8 +244,10 @@
       GNUNET_free (open_port_str);
       if (GNUNET_OK == GNUNET_NETWORK_socket_bind (socket, ret->ai_addr, 
ret->ai_addrlen))
       {
+       freeaddrinfo (ret);
        return open_port;
       }
+      freeaddrinfo (ret);
       /* This port is in use by some other application */
       port_buckets[index] |= (1U << pos);    
       pos++;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]