gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r10943 - gnunet/src/hostlist


From: gnunet
Subject: [GNUnet-SVN] r10943 - gnunet/src/hostlist
Date: Fri, 16 Apr 2010 17:57:19 +0200

Author: wachs
Date: 2010-04-16 17:57:19 +0200 (Fri, 16 Apr 2010)
New Revision: 10943

Modified:
   gnunet/src/hostlist/hostlist-client.c
   gnunet/src/hostlist/hostlist-server.c
Log:


Modified: gnunet/src/hostlist/hostlist-client.c
===================================================================
--- gnunet/src/hostlist/hostlist-client.c       2010-04-16 15:56:55 UTC (rev 
10942)
+++ gnunet/src/hostlist/hostlist-client.c       2010-04-16 15:57:19 UTC (rev 
10943)
@@ -1053,7 +1053,7 @@
       return;
     }
 
-
+  counter = 0;
   while ( (GNUNET_OK == GNUNET_BIO_read_string (rh, "url" , &uri, 
MAX_URL_LEN)) &&
          (GNUNET_OK == GNUNET_BIO_read_int32 (rh, &times_used)) &&
          (GNUNET_OK == GNUNET_BIO_read_int64 (rh, &quality)) &&
@@ -1072,6 +1072,7 @@
       linked_list_size++;
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Added hostlist entry eith URI `%s' \n", 
hostlist->hostlist_uri);
+      GNUNET_free (uri);
       uri = NULL;
       counter++;
       if ( counter >= MAX_NUMBER_HOSTLISTS ) break;
@@ -1114,6 +1115,7 @@
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   _("No `%s' specified in `%s' configuration, cannot save 
hostlists to file.\n"),
                   "HOSTLISTFILE", "HOSTLIST");
+                  GNUNET_free (filename);
       return;
     }
   wh = GNUNET_BIO_write_open (filename);
@@ -1123,6 +1125,7 @@
                   _("Could not open file `%s' for writing to save hostlists: 
%s\n"),
                   filename,
                  STRERROR (errno));
+                  GNUNET_free (filename);
       return;
     }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,

Modified: gnunet/src/hostlist/hostlist-server.c
===================================================================
--- gnunet/src/hostlist/hostlist-server.c       2010-04-16 15:56:55 UTC (rev 
10942)
+++ gnunet/src/hostlist/hostlist-server.c       2010-04-16 15:57:19 UTC (rev 
10943)
@@ -613,6 +613,7 @@
       size = strlen (hostname);
       if (size + 15 > MAX_URL_LEN)
        {
+          GNUNET_free ( hostname );
          GNUNET_break (0);
        }
       else
@@ -627,6 +628,7 @@
                      hostlist_uri);
        }
     }
+  GNUNET_free ( hostname );
   daemon_handle_v6 = MHD_start_daemon (MHD_USE_IPv6 
 #if DEBUG_HOSTLIST_SERVER
                                       | MHD_USE_DEBUG





reply via email to

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