From 28115ddf012cb57b6c7e76cf5d48ef640caf73b2 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 16 Apr 2010 15:57:19 +0000 Subject: [PATCH] --- src/hostlist/hostlist-client.c | 5 ++++- src/hostlist/hostlist-server.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index ecdd578af..181f9da14 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c @@ -1053,7 +1053,7 @@ load_hostlist_file () return; } - + counter = 0; while ( (GNUNET_OK == GNUNET_BIO_read_string (rh, "url" , &uri, MAX_URL_LEN)) && (GNUNET_OK == GNUNET_BIO_read_int32 (rh, ×_used)) && (GNUNET_OK == GNUNET_BIO_read_int64 (rh, &quality)) && @@ -1072,6 +1072,7 @@ load_hostlist_file () 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 @@ static void save_hostlist_file ( int shutdown ) 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 @@ static void save_hostlist_file ( int shutdown ) _("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, diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c index e9a72d42b..bb9265b3a 100644 --- a/src/hostlist/hostlist-server.c +++ b/src/hostlist/hostlist-server.c @@ -613,6 +613,7 @@ GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c, size = strlen (hostname); if (size + 15 > MAX_URL_LEN) { + GNUNET_free ( hostname ); GNUNET_break (0); } else @@ -627,6 +628,7 @@ GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c, hostlist_uri); } } + GNUNET_free ( hostname ); daemon_handle_v6 = MHD_start_daemon (MHD_USE_IPv6 #if DEBUG_HOSTLIST_SERVER | MHD_USE_DEBUG -- 2.25.1