From: Christian Grothoff Date: Sun, 13 Jun 2010 11:44:41 +0000 (+0000) Subject: fixes X-Git-Tag: initial-import-from-subversion-38251~21404 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=37ad983d488bb8c62cd26823850ba01ee2e499d7;p=oweals%2Fgnunet.git fixes --- diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 055e3c4b4..519f3e35c 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c @@ -493,6 +493,8 @@ run (void *cls, _("Failed to parse URI: %s\n"), emsg); GNUNET_free (emsg); + if (namespace != NULL) + GNUNET_FS_namespace_delete (namespace, GNUNET_NO); GNUNET_FS_stop (ctx); ret = 1; return; @@ -507,6 +509,8 @@ run (void *cls, GNUNET_FS_PUBLISH_OPTION_NONE, &uri_ksk_continuation, NULL); + if (namespace != NULL) + GNUNET_FS_namespace_delete (namespace, GNUNET_NO); return; } l = NULL; diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c index a3fa98fa9..a289569eb 100644 --- a/src/peerinfo-tool/gnunet-peerinfo.c +++ b/src/peerinfo-tool/gnunet-peerinfo.c @@ -204,6 +204,7 @@ print_peer_info (void *cls, return; } GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO, &print_address, pc); + GNUNET_free (pc); } diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c index 057befaa6..6693dadd2 100644 --- a/src/util/pseudonym.c +++ b/src/util/pseudonym.c @@ -243,16 +243,17 @@ read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_free (fn); return GNUNET_SYSERR; } + emsg = NULL; if ( (GNUNET_OK != GNUNET_BIO_read_int32 (fileR, ranking)) || (GNUNET_OK != GNUNET_BIO_read_string(fileR, "Read string error!", ns_name, 200)) || (GNUNET_OK != GNUNET_BIO_read_meta_data(fileR, "Read meta data error!", meta)) ) { GNUNET_BIO_read_close(fileR, &emsg); + GNUNET_free_non_null (emsg); GNUNET_break (GNUNET_OK == GNUNET_DISK_directory_remove (fn)); GNUNET_free (fn); return GNUNET_SYSERR; } - emsg = NULL; if (GNUNET_OK != GNUNET_BIO_read_close(fileR, &emsg)) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, diff --git a/src/util/service.c b/src/util/service.c index d59b0c0ff..463b88999 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -877,6 +877,7 @@ GNUNET_SERVICE_get_server_addresses (const char *serviceName, (errno == ENOMEM) || (errno == ENFILE) || (errno == EACCES)) { GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); + GNUNET_free_non_null (hostname); return GNUNET_SYSERR; } GNUNET_log (GNUNET_ERROR_TYPE_INFO,