gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated (d8cbbb5b6 -> dc5501061)


From: gnunet
Subject: [gnunet] branch master updated (d8cbbb5b6 -> dc5501061)
Date: Mon, 06 Feb 2023 06:19:02 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a change to branch master
in repository gnunet.

    from d8cbbb5b6 REVOCATION: add shutdown task earlier.
     new a1d994126 -Fix -Wstacl-protector typo.
     new a3cc7ff47 NAT: don't leak AddrEntries when unregistering.
     new fa423b69a -Miscellaneous mostly-comment typo fixes.
     new 913ea68f2 -CORE: fix memory leak in test.
     new 4b72d6b5d -DATACACHE: fix memory leaks in tests.
     new 092019634 DHT: remove "memory leak" in gnunet-dht-{get,put}.
     new 08d2e1d37 FS: fix memory leak in GNUNET_FS_search_stop.
     new fa443d774 -GNS: use proper config file name in test_proxy.sh.
     new 72b16124e GNSRECORD: fix memory leaks in tests.
     new efad40e99 -HELLO: fix memory leaks in tests.
     new 5a91ea8e9 HELLO: fix memory leak in GNUNET_HELLO_extract_address.
     new f7a3ef7b4 JSON: fix memory leaks in test.
     new 207d86670 -NAMESTORE: fix memory leaks in tests.
     new 1e8b9a467 NAMESTORE: fix memory leak in parse_recordline.
     new eb1b1af26 NAMESTORE: fix overread in handle_record_store.
     new ebdafecb3 NAMESTORE: avoid use-after-free in handle_record_result.
     new ecea740a0 PEERSTORE: fix write-after-free in 
handle_{iterate_end,watch_record}
     new 89dfff6d9 RECLAIM: rename G_D_key_covert_... to G_D_key_convert_...
     new 09ed5e00e RECLAIM: fix 1-byte overflow in DID_did_to_pkey.
     new 3f4464acd RECLAIM: don't leak the elements of attr_list.
     new 9719babb5 -RECLAIM: fix memory leaks in tests.
     new ded7050ae TESTBED: don't leak helper_argv when SSH can't be executed.
     new 76a3a328b REVOCATION: don't leak signature purpose memory.
     new 74bebb5c9 REST: don't leak basic_auth_file.
     new 7341cdfb5 SETU: avoid 64-bit shift on 64-bit value.
     new f4869a6bd -SECRETSHARING: don't leak my_share in test.
     new 64c5d0472 SETU: prevent misaligned access to 
StrataEstimatorMessage.set_size.
     new dc5501061 SETU: don't leak 
Operation.{message_control_flow,inquiries_sent}.

The 28 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac                                       |  2 +-
 src/consensus/gnunet-consensus-profiler.c          |  2 +-
 src/core/test_core_quota_compliance.c              |  1 +
 src/datacache/test_datacache.c                     |  1 +
 src/datacache/test_datacache_quota.c               |  1 +
 src/dht/gnunet-dht-get.c                           | 26 ++++++++++++----------
 src/dht/gnunet-dht-put.c                           |  9 ++++----
 src/fs/fs_search.c                                 |  3 +++
 src/gns/test_proxy.sh                              |  2 +-
 src/gnsrecord/test_gnsrecord_block_expiration.c    |  3 +++
 src/gnsrecord/test_gnsrecord_crypto.c              |  2 ++
 src/hello/hello-ng.c                               |  2 ++
 src/hello/test_hello-ng.c                          |  8 +++++--
 src/hello/test_hello-uri.c                         |  1 +
 src/include/gnunet_mq_lib.h                        |  2 +-
 src/include/gnunet_testbed_service.h               |  4 ++--
 src/json/test_json.c                               |  5 +++++
 src/namestore/gnunet-namestore.c                   |  2 ++
 src/namestore/gnunet-service-namestore.c           | 17 +++++++++-----
 src/namestore/namestore_api.c                      | 16 ++++++++-----
 src/namestore/perf_namestore_api_import.c          |  1 +
 src/namestore/perf_namestore_api_zone_iteration.c  |  1 +
 src/namestore/test_common.c                        |  2 ++
 src/namestore/test_namestore_api_edit_records.c    |  1 +
 src/namestore/test_namestore_api_lookup_nick.c     |  1 +
 src/namestore/test_namestore_api_monitoring.c      |  1 +
 .../test_namestore_api_monitoring_existing.c       |  1 +
 src/namestore/test_namestore_api_remove.c          |  1 +
 ...test_namestore_api_remove_not_existing_record.c |  1 +
 src/namestore/test_namestore_api_store.c           |  1 +
 src/namestore/test_namestore_api_store_update.c    |  2 ++
 src/namestore/test_namestore_api_tx_rollback.c     |  1 +
 src/namestore/test_namestore_api_zone_iteration.c  |  1 +
 .../test_namestore_api_zone_iteration_nick.c       |  1 +
 ...st_namestore_api_zone_iteration_specific_zone.c |  1 +
 .../test_namestore_api_zone_iteration_stop.c       |  1 +
 src/namestore/test_namestore_api_zone_to_name.c    |  1 +
 src/nat/nat_api.c                                  | 11 +++++++++
 src/peerstore/peerstore_api.c                      |  5 +++--
 src/reclaim/did_helper.c                           |  8 +++----
 src/reclaim/did_helper.h                           |  4 ++--
 src/reclaim/gnunet-reclaim.c                       |  5 ++++-
 src/reclaim/test_did_helper.c                      | 13 +++++++----
 src/reclaim/test_reclaim_attribute.c               |  1 +
 src/rest/gnunet-rest-server.c                      |  3 +++
 src/revocation/revocation_api.c                    | 19 ++++++++--------
 src/secretsharing/gnunet-secretsharing-profiler.c  |  2 +-
 src/secretsharing/test_secretsharing_api.c         |  1 +
 src/setu/gnunet-service-setu.c                     | 25 ++++++++++++++++++++-
 src/setu/gnunet-service-setu_protocol.h            |  2 +-
 src/setu/gnunet-service-setu_strata_estimator.c    |  3 ++-
 src/testbed/test_testbed_api.c                     |  2 +-
 src/testbed/test_testbed_api_test.c                |  2 +-
 src/testbed/testbed_api.c                          |  2 +-
 src/testbed/testbed_api_hosts.c                    |  7 +++---
 55 files changed, 175 insertions(+), 68 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2bc9d0f2a..1472877d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -489,7 +489,7 @@ AC_ARG_ENABLE([gcc-hardening],
   [AS_HELP_STRING([--enable-gcc-hardening], [enable compiler security 
checks])],
   [AS_IF([test "x$enableval" = "xyes"],
      [CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 
-fstack-protector-all"
-      CFLAGS="$CFLAGS -fwrapv -fPIE -Wstacl-protector"
+      CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
       CFLAGS="$CFLAGS --param ssp-buffer-size=1"
       LDFLAGS="$LDFLAGS -pie"])])
 
diff --git a/src/consensus/gnunet-consensus-profiler.c 
b/src/consensus/gnunet-consensus-profiler.c
index 07a536a2d..535837008 100644
--- a/src/consensus/gnunet-consensus-profiler.c
+++ b/src/consensus/gnunet-consensus-profiler.c
@@ -380,7 +380,7 @@ disconnect_adapter (void *cls, void *op_result)
 /**
  * Callback to be called when the requested peer information is available
  *
- * @param cb_cls the closure from GNUNET_TETSBED_peer_get_information()
+ * @param cb_cls the closure from GNUNET_TESTBED_peer_get_information()
  * @param op the operation this callback corresponds to
  * @param pinfo the result; will be NULL if the operation has failed
  * @param emsg error message if the operation has failed; will be NULL if the
diff --git a/src/core/test_core_quota_compliance.c 
b/src/core/test_core_quota_compliance.c
index eb5ca7c2b..099c6fa3b 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -530,6 +530,7 @@ process_hello (void *cls,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received (my) HELLO from transport service\n");
   GNUNET_assert (message != NULL);
+  if (NULL != p->hello) GNUNET_free (p->hello);
   p->hello = GNUNET_malloc (ntohs (message->size));
   GNUNET_memcpy (p->hello, message, ntohs (message->size));
   if ((p == &p1) &&
diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c
index fd5a5f54c..5392f6b17 100644
--- a/src/datacache/test_datacache.c
+++ b/src/datacache/test_datacache.c
@@ -198,6 +198,7 @@ main (int argc, char *argv[])
     fprintf (stderr,
              "Missed some testcases: %d\n",
              ok);
+  GNUNET_free (plugin_name);
   return ok;
 }
 
diff --git a/src/datacache/test_datacache_quota.c 
b/src/datacache/test_datacache_quota.c
index 994147a64..0ad7fb8a4 100644
--- a/src/datacache/test_datacache_quota.c
+++ b/src/datacache/test_datacache_quota.c
@@ -186,6 +186,7 @@ main (int argc,
     fprintf (stderr,
              "Missed some testcases: %d\n",
              ok);
+  GNUNET_free (plugin_name);
   return ok;
 }
 
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c
index 1ae9235f8..4a071dbad 100644
--- a/src/dht/gnunet-dht-get.c
+++ b/src/dht/gnunet-dht-get.c
@@ -329,18 +329,20 @@ main (int argc, char *const *argv)
       GNUNET_STRINGS_get_utf8_args (argc, argv,
                                     &argc, &argv))
     return 2;
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (
-            argc,
-            argv,
-            "gnunet-dht-get",
-            gettext_noop (
-              "Issue a GET request to the GNUnet DHT, prints results."),
-            options,
-            &run,
-            NULL))
-         ? ret
-         : 1;
+  ret = (GNUNET_OK ==
+         GNUNET_PROGRAM_run (
+           argc,
+           argv,
+           "gnunet-dht-get",
+           gettext_noop (
+             "Issue a GET request to the GNUnet DHT, prints results."),
+           options,
+           &run,
+           NULL))
+        ? ret
+        : 1;
+  GNUNET_free (argv);
+  return ret;
 }
 
 
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c
index 531107ef2..2281ff56b 100644
--- a/src/dht/gnunet-dht-put.c
+++ b/src/dht/gnunet-dht-put.c
@@ -226,13 +226,12 @@ main (int argc, char *const *argv)
     GNUNET_GETOPT_OPTION_END
   };
 
-
   if (GNUNET_OK !=
       GNUNET_STRINGS_get_utf8_args (argc, argv,
                                     &argc, &argv))
     return 2;
   expiration = GNUNET_TIME_UNIT_HOURS;
-  return (GNUNET_OK ==
+  ret = (GNUNET_OK ==
           GNUNET_PROGRAM_run (
             argc,
             argv,
@@ -242,8 +241,10 @@ main (int argc, char *const *argv)
             options,
             &run,
             NULL))
-         ? ret
-         : 1;
+        ? ret
+        : 1;
+  GNUNET_free (argv);
+  return ret;
 }
 
 
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 823f046ed..8b8c54c67 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -1811,7 +1811,10 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext 
*sc)
   {
     GNUNET_assert (GNUNET_FS_uri_test_ksk (sc->uri));
     for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)
+    {
       GNUNET_CONTAINER_multihashmap_destroy (sc->requests[i].results);
+      GNUNET_free (sc->requests[i].keyword);
+    }
   }
   GNUNET_free (sc->requests);
   GNUNET_free (sc->emsg);
diff --git a/src/gns/test_proxy.sh b/src/gns/test_proxy.sh
index 720fe643d..bb63a436e 100755
--- a/src/gns/test_proxy.sh
+++ b/src/gns/test_proxy.sh
@@ -2,7 +2,7 @@
 # This file is in the public domain.
 TEST_DOMAIN="www.test"
 GNUNET_TMP="$(gnunet-config -f -s PATHS -o GNUNET_TMP)"
-PROXY_CACERT="$(gnunet-config -f -c test_gnunet_proxy.conf -s gns-proxy -o 
PROXY_CACERT)"
+PROXY_CACERT="$(gnunet-config -f -c test_gns_proxy.conf -s gns-proxy -o 
PROXY_CACERT)"
 
 # Delete old files before starting test
 rm -rf "$GNUNET_TMP/test-gnunet-gns-testing/"
diff --git a/src/gnsrecord/test_gnsrecord_block_expiration.c 
b/src/gnsrecord/test_gnsrecord_block_expiration.c
index 69f7f6aa1..3ef02e631 100644
--- a/src/gnsrecord/test_gnsrecord_block_expiration.c
+++ b/src/gnsrecord/test_gnsrecord_block_expiration.c
@@ -78,6 +78,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   rd[1].expiration_time = expiration_abs_shadow.abs_value_us;
   rd[1].record_type = TEST_RECORD_TYPE;
   rd[1].data_size = TEST_RECORD_DATALEN;
+  GNUNET_free (rd[1].data);
   rd[1].data = GNUNET_malloc (TEST_RECORD_DATALEN);
   rd[1].flags = GNUNET_GNSRECORD_RF_SHADOW;
   memset ((char *) rd[1].data, TEST_RECORD_DATA, TEST_RECORD_DATALEN);
@@ -86,6 +87,8 @@ run (void *cls, char *const *args, const char *cfgfile,
                  GNUNET_GNSRECORD_record_get_expiration_time (2,
                                                               rd,
                                                              
GNUNET_TIME_UNIT_ZERO_ABS).abs_value_us);
+  GNUNET_free (rd[0].data);
+  GNUNET_free (rd[1].data);
   res = 0;
 }
 
diff --git a/src/gnsrecord/test_gnsrecord_crypto.c 
b/src/gnsrecord/test_gnsrecord_crypto.c
index 5b1032f1e..92a7a9f1f 100644
--- a/src/gnsrecord/test_gnsrecord_crypto.c
+++ b/src/gnsrecord/test_gnsrecord_crypto.c
@@ -143,6 +143,8 @@ test_with_type (struct GNUNET_IDENTITY_PrivateKey *privkey)
                                                  s_name,
                                                  &rd_decrypt_cb,
                                                  NULL));
+  for (int i = 0; i < RECORDS; i++) GNUNET_free(s_rd[i].data);
+  GNUNET_free (s_rd);
   GNUNET_free (block);
 }
 
diff --git a/src/hello/hello-ng.c b/src/hello/hello-ng.c
index da3a069e0..9d77e4f80 100644
--- a/src/hello/hello-ng.c
+++ b/src/hello/hello-ng.c
@@ -169,9 +169,11 @@ GNUNET_HELLO_extract_address (const void *raw,
                                   sig,
                                   public_key))
   {
+    GNUNET_free (data);
     GNUNET_break_op (0);
     return NULL;
   }
+  GNUNET_free (data);
   *mono_time = raw_mono_time;
   *nt = raw_nt;
   return GNUNET_strdup (raw_addr);
diff --git a/src/hello/test_hello-ng.c b/src/hello/test_hello-ng.c
index 4ace9439f..ef84e2425 100644
--- a/src/hello/test_hello-ng.c
+++ b/src/hello/test_hello-ng.c
@@ -31,6 +31,7 @@ main (int argc,
   struct GNUNET_PeerIdentity pid;
   struct GNUNET_TIME_Absolute t = GNUNET_TIME_absolute_get ();
   char *res;
+  char *address;
   size_t res_len;
   enum GNUNET_NetworkType nt;
 
@@ -47,10 +48,13 @@ main (int argc,
   GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
               "%s\n", res);
   GNUNET_assert (NULL !=
-                 GNUNET_HELLO_extract_address ((void**) res,
+                 (address =
+                  GNUNET_HELLO_extract_address ((void**) res,
                                                res_len,
                                                &pid,
                                                &nt,
-                                               &t));
+                                                &t)));
+  GNUNET_free (address);
+  GNUNET_free (res);
   return 0;
 }
diff --git a/src/hello/test_hello-uri.c b/src/hello/test_hello-uri.c
index 7e70d6763..01b6f2d8e 100644
--- a/src/hello/test_hello-uri.c
+++ b/src/hello/test_hello-uri.c
@@ -207,6 +207,7 @@ main (int argc,
              url);
     GNUNET_free (url);
   }
+  GNUNET_HELLO_builder_free (b);
 
   return 0;
 }
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h
index 95e8c619b..f424c49c2 100644
--- a/src/include/gnunet_mq_lib.h
+++ b/src/include/gnunet_mq_lib.h
@@ -994,7 +994,7 @@ GNUNET_MQ_destroy_notify_cancel (
  * Call the message message handler that was registered
  * for the type of the given message in the given message queue.
  *
- * This function is indented to be used for the implementation
+ * This function is intended to be used for the implementation
  * of message queues.
  *
  * @param mq message queue with the handlers
diff --git a/src/include/gnunet_testbed_service.h 
b/src/include/gnunet_testbed_service.h
index acd87e2cd..2aeafc977 100644
--- a/src/include/gnunet_testbed_service.h
+++ b/src/include/gnunet_testbed_service.h
@@ -428,7 +428,7 @@ typedef void
  * GNUNET_TESTBED_ControllerStatusCallback()
  *
  * @param trusted_ip the ip address of the controller which will be set as 
TRUSTED
- *          HOST(all connections form this ip are permitted by the testbed) 
when
+ *          HOST(all connections from this ip are permitted by the testbed) 
when
  *          starting testbed controller at host. This can either be a single ip
  *          address or a network address in CIDR notation.
  * @param host the host where the controller has to be started.  CANNOT be 
NULL.
@@ -752,7 +752,7 @@ struct GNUNET_TESTBED_PeerInformation
  * Callback to be called when the requested peer information is available
  * The peer information in the callback is valid until the operation 'op' is 
canceled.
  *
- * @param cb_cls the closure from GNUNET_TETSBED_peer_get_information()
+ * @param cb_cls the closure from GNUNET_TESTBED_peer_get_information()
  * @param op the operation this callback corresponds to
  * @param pinfo the result; will be NULL if the operation has failed
  * @param emsg error message if the operation has failed; will be NULL if the
diff --git a/src/json/test_json.c b/src/json/test_json.c
index d6c372cf3..db376d213 100644
--- a/src/json/test_json.c
+++ b/src/json/test_json.c
@@ -141,6 +141,7 @@ test_raw ()
     GNUNET_assert (NULL != j);
     GNUNET_assert (GNUNET_OK == GNUNET_JSON_parse (j, spec, NULL, NULL));
     GNUNET_assert (0 == memcmp (blob, blob2, i));
+    json_decref (j);
   }
   return 0;
 }
@@ -177,6 +178,8 @@ test_rsa ()
   GNUNET_assert (GNUNET_OK == GNUNET_JSON_parse (js, sspec, NULL, NULL));
   GNUNET_break (0 == GNUNET_CRYPTO_rsa_signature_cmp (sig, sig2));
   GNUNET_break (0 == GNUNET_CRYPTO_rsa_public_key_cmp (pub, pub2));
+  json_decref (jp);
+  json_decref (js);
   GNUNET_CRYPTO_rsa_signature_free (sig);
   GNUNET_CRYPTO_rsa_signature_free (sig2);
   GNUNET_CRYPTO_rsa_private_key_free (priv);
@@ -216,6 +219,8 @@ test_boolean ()
 
   GNUNET_assert (GNUNET_OK != GNUNET_JSON_parse (json, pspec, NULL, NULL));
 
+  json_decref (json);
+
   return 0;
 }
 
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 7288db902..0329c9c63 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -464,8 +464,10 @@ parse_recordline (const char *line)
                 _ ("Invalid record data for type %s: `%s'.\n"),
                 GNUNET_GNSRECORD_number_to_typename (record.record_type),
                 tok);
+    GNUNET_free (cp);
     return GNUNET_SYSERR;
   }
+  GNUNET_free (cp);
 
   r = GNUNET_malloc (sizeof(struct RecordSetEntry) + record.data_size);
   r->next = *head;
diff --git a/src/namestore/gnunet-service-namestore.c 
b/src/namestore/gnunet-service-namestore.c
index d25287c9f..ed06b1dc5 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -1735,11 +1735,19 @@ handle_record_store (void *cls, const struct 
RecordStoreMessage *rp_msg)
   ssize_t read;
   size_t key_len;
   size_t kb_read;
+  size_t rp_msg_len;
+  size_t rs_len;
+  size_t rs_off;
+  size_t body_len;
   struct StoreActivity *sa;
   struct RecordSet *rs;
   enum GNUNET_ErrorCode res;
 
   key_len = ntohs (rp_msg->key_len);
+  rp_msg_len = ntohs (rp_msg->gns_header.header.size);
+  body_len = rp_msg_len - sizeof (*rp_msg);
+  rs_off = sizeof (*rp_msg) + key_len;
+  rs_len = rp_msg_len - rs_off;
   if ((GNUNET_SYSERR ==
        GNUNET_IDENTITY_read_private_key_from_buffer (&rp_msg[1],
                                                      key_len,
@@ -1756,7 +1764,7 @@ handle_record_store (void *cls, const struct 
RecordStoreMessage *rp_msg)
               "Received NAMESTORE_RECORD_STORE message\n");
   rid = ntohl (rp_msg->gns_header.r_id);
   rd_set_count = ntohs (rp_msg->rd_set_count);
-  buf = (const char *) &rp_msg[1] + key_len;
+  buf = (const char *) rp_msg + rs_off;
   for (int i = 0; i < rd_set_count; i++)
   {
     rs = (struct RecordSet *) buf;
@@ -1770,15 +1778,12 @@ handle_record_store (void *cls, const struct 
RecordStoreMessage *rp_msg)
     }
     buf += read;
   }
-  sa = GNUNET_malloc (sizeof(struct StoreActivity)
-                      + ntohs (rp_msg->gns_header.header.size)
-                      - sizeof (*rp_msg));
+  sa = GNUNET_malloc (sizeof(struct StoreActivity) + rs_len);
   GNUNET_CONTAINER_DLL_insert (sa_head, sa_tail, sa);
   sa->nc = nc;
   sa->rs = (struct RecordSet *) &sa[1];
   sa->rd_set_count = rd_set_count;
-  GNUNET_memcpy (&sa[1], (char *) &rp_msg[1] + key_len,
-                 ntohs (rp_msg->gns_header.header.size) - sizeof (*rp_msg));
+  GNUNET_memcpy (&sa[1], (char *) rp_msg + rs_off, rs_len);
   sa->rid = rid;
   sa->rd_set_pos = 0;
   sa->private_key = zone;
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index df6ba1f33..2c5efb745 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -619,11 +619,17 @@ handle_record_result (void *cls, const struct 
RecordResultMessage *msg)
     }
     if (NULL != ze)
     {
-      if (NULL != ze->proc)
-        ze->proc (ze->proc_cls, &private_key, name, rd_count, rd);
-      if (NULL != ze->proc2)
-        ze->proc2 (ze->proc_cls, &private_key, name,
-                   rd_count, rd, GNUNET_TIME_absolute_ntoh (msg->expire));
+      // Store them here because a callback could free ze
+      GNUNET_NAMESTORE_RecordMonitor proc;
+      GNUNET_NAMESTORE_RecordSetMonitor proc2;
+      void *proc_cls = ze->proc_cls;
+      proc = ze->proc;
+      proc2 = ze->proc2;
+      if (NULL != proc)
+        proc (proc_cls, &private_key, name, rd_count, rd);
+      if (NULL != proc2)
+        proc2 (proc_cls, &private_key, name,
+               rd_count, rd, GNUNET_TIME_absolute_ntoh (msg->expire));
       return;
     }
   }
diff --git a/src/namestore/perf_namestore_api_import.c 
b/src/namestore/perf_namestore_api_import.c
index cde5eaad5..b4f17f742 100644
--- a/src/namestore/perf_namestore_api_import.c
+++ b/src/namestore/perf_namestore_api_import.c
@@ -397,6 +397,7 @@ main (int argc,
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/perf_namestore_api_zone_iteration.c 
b/src/namestore/perf_namestore_api_zone_iteration.c
index 0e0b6d93b..bf89d6225 100644
--- a/src/namestore/perf_namestore_api_zone_iteration.c
+++ b/src/namestore/perf_namestore_api_zone_iteration.c
@@ -369,6 +369,7 @@ main (int argc,
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_common.c b/src/namestore/test_common.c
index e35c76075..60749a0b1 100644
--- a/src/namestore/test_common.c
+++ b/src/namestore/test_common.c
@@ -102,6 +102,7 @@ TNC_test_plugin (const char *cfg_name)
     GNUNET_asprintf (&cfg_name, file_template, plugin_name); \
     if (! TNC_test_plugin (cfg_name))                                       \
     {                                                                       \
+      GNUNET_free (plugin_name);                                            \
       GNUNET_free (cfg_name);                                               \
       return 77;                                                            \
     }                                                                       \
@@ -119,6 +120,7 @@ TNC_test_plugin (const char *cfg_name)
     GNUNET_asprintf (&cfg_name, "test_namestore_api_%s.conf", plugin_name); \
     if (! TNC_test_plugin (cfg_name))                                       \
     {                                                                       \
+      GNUNET_free (plugin_name);                                            \
       GNUNET_free (cfg_name);                                               \
       return 77;                                                            \
     }                                                                       \
diff --git a/src/namestore/test_namestore_api_edit_records.c 
b/src/namestore/test_namestore_api_edit_records.c
index fb588f0e1..fbee57432 100644
--- a/src/namestore/test_namestore_api_edit_records.c
+++ b/src/namestore/test_namestore_api_edit_records.c
@@ -390,6 +390,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_lookup_nick.c 
b/src/namestore/test_namestore_api_lookup_nick.c
index 8fa001196..b26674a95 100644
--- a/src/namestore/test_namestore_api_lookup_nick.c
+++ b/src/namestore/test_namestore_api_lookup_nick.c
@@ -338,6 +338,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_monitoring.c 
b/src/namestore/test_namestore_api_monitoring.c
index b129c2996..271f4c40b 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -369,6 +369,7 @@ main (int argc,
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c 
b/src/namestore/test_namestore_api_monitoring_existing.c
index bc03de541..87476b309 100644
--- a/src/namestore/test_namestore_api_monitoring_existing.c
+++ b/src/namestore/test_namestore_api_monitoring_existing.c
@@ -384,6 +384,7 @@ main (int argc,
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_remove.c 
b/src/namestore/test_namestore_api_remove.c
index 5aab2ebe6..9c00cdfad 100644
--- a/src/namestore/test_namestore_api_remove.c
+++ b/src/namestore/test_namestore_api_remove.c
@@ -210,6 +210,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c 
b/src/namestore/test_namestore_api_remove_not_existing_record.c
index ea95a6b57..9a3eabbee 100644
--- a/src/namestore/test_namestore_api_remove_not_existing_record.c
+++ b/src/namestore/test_namestore_api_remove_not_existing_record.c
@@ -170,6 +170,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_store.c 
b/src/namestore/test_namestore_api_store.c
index d291045e5..f8a3dd412 100644
--- a/src/namestore/test_namestore_api_store.c
+++ b/src/namestore/test_namestore_api_store.c
@@ -163,6 +163,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_store_update.c 
b/src/namestore/test_namestore_api_store_update.c
index bef19385c..9baa4becd 100644
--- a/src/namestore/test_namestore_api_store_update.c
+++ b/src/namestore/test_namestore_api_store_update.c
@@ -143,6 +143,7 @@ lookup_success (void *cls,
                                            &rd_new,
                                            &put_cont,
                                            (void *) name);
+    GNUNET_free (rd_new.data);
     update_performed = GNUNET_YES;
   }
   else
@@ -259,6 +260,7 @@ main (int argc,
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_tx_rollback.c 
b/src/namestore/test_namestore_api_tx_rollback.c
index 5b4bc6174..1b1d00c96 100644
--- a/src/namestore/test_namestore_api_tx_rollback.c
+++ b/src/namestore/test_namestore_api_tx_rollback.c
@@ -255,6 +255,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_zone_iteration.c 
b/src/namestore/test_namestore_api_zone_iteration.c
index e072dbef9..f9bf4986b 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -455,6 +455,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c 
b/src/namestore/test_namestore_api_zone_iteration_nick.c
index e371bb312..5855b1e87 100644
--- a/src/namestore/test_namestore_api_zone_iteration_nick.c
+++ b/src/namestore/test_namestore_api_zone_iteration_nick.c
@@ -451,6 +451,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c 
b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index 074cd4dbb..519383169 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -438,6 +438,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c 
b/src/namestore/test_namestore_api_zone_iteration_stop.c
index 7efe59648..4fe86301c 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -439,6 +439,7 @@ main (int argc, char *argv[])
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
 
   return res;
diff --git a/src/namestore/test_namestore_api_zone_to_name.c 
b/src/namestore/test_namestore_api_zone_to_name.c
index dfdefa039..a99b7bc71 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -257,6 +257,7 @@ main (int argc,
   }
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (plugin_name);
   GNUNET_free (cfg_name);
   return res;
 }
diff --git a/src/nat/nat_api.c b/src/nat/nat_api.c
index 3072cff7f..31f8f388d 100644
--- a/src/nat/nat_api.c
+++ b/src/nat/nat_api.c
@@ -673,6 +673,9 @@ GNUNET_NAT_request_reversal (struct GNUNET_NAT_Handle *nh,
 void
 GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *nh)
 {
+  struct AddrEntry *ae;
+  struct AddrEntry *next;
+
   if (NULL != nh->mq)
   {
     GNUNET_MQ_destroy (nh->mq);
@@ -683,6 +686,14 @@ GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *nh)
     GNUNET_SCHEDULER_cancel (nh->reconnect_task);
     nh->reconnect_task = NULL;
   }
+  next = nh->ae_head;
+  while (NULL != next)
+  {
+    ae = next;
+    next = next->next;
+    GNUNET_CONTAINER_DLL_remove (nh->ae_head, nh->ae_tail, ae);
+    GNUNET_free (ae);
+  }
   GNUNET_free (nh->reg);
   GNUNET_free (nh);
 }
diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c
index b3e793d93..1c13369cf 100644
--- a/src/peerstore/peerstore_api.c
+++ b/src/peerstore/peerstore_api.c
@@ -608,9 +608,10 @@ handle_iterate_end (void *cls, const struct 
GNUNET_MessageHeader *msg)
   callback_cls = ic->callback_cls;
   ic->iterating = GNUNET_NO;
   GNUNET_PEERSTORE_iterate_cancel (ic);
+  /* NOTE: set this here and not after callback because callback may free h */
+  h->reconnect_delay = GNUNET_TIME_UNIT_ZERO;
   if (NULL != callback)
     callback (callback_cls, NULL, NULL);
-  h->reconnect_delay = GNUNET_TIME_UNIT_ZERO;
 }
 
 
@@ -781,9 +782,9 @@ handle_watch_record (void *cls, const struct 
StoreRecordMessage *msg)
     disconnect_and_schedule_reconnect (h);
     return;
   }
+  h->reconnect_delay = GNUNET_TIME_UNIT_ZERO;
   if (NULL != wc->callback)
     wc->callback (wc->callback_cls, record, NULL);
-  h->reconnect_delay = GNUNET_TIME_UNIT_ZERO;
   PEERSTORE_destroy_record (record);
 }
 
diff --git a/src/reclaim/did_helper.c b/src/reclaim/did_helper.c
index 1c04ede33..17f3b21b2 100644
--- a/src/reclaim/did_helper.c
+++ b/src/reclaim/did_helper.c
@@ -78,7 +78,7 @@ DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego)
 enum GNUNET_GenericReturnValue
 DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey)
 {
-  char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH];
+  char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH + 1]; /* 0-term */
 
   if ((1 != (sscanf (did,
                      GNUNET_DID_METHOD_PREFIX "%"
@@ -98,7 +98,7 @@ DID_did_to_pkey (const char *did, struct 
GNUNET_IDENTITY_PublicKey *pkey)
  * @brief Convert a base 64 encoded public key to a GNUNET key
  */
 struct GNUNET_IDENTITY_PublicKey *
-GNUNET_DID_key_covert_multibase_base64_to_gnunet (char *pkey_str)
+GNUNET_DID_key_convert_multibase_base64_to_gnunet (char *pkey_str)
 {
   return NULL;
 }
@@ -107,7 +107,7 @@ GNUNET_DID_key_covert_multibase_base64_to_gnunet (char 
*pkey_str)
  * @brief Convert GNUNET key to a base 64 encoded public key
  */
 char *
-DID_key_covert_gnunet_to_multibase_base64 (struct
+DID_key_convert_gnunet_to_multibase_base64 (struct
                                            GNUNET_IDENTITY_PublicKey *
                                            pkey)
 {
@@ -154,7 +154,7 @@ DID_pkey_to_did_document (struct GNUNET_IDENTITY_PublicKey 
*pkey)
   did_str = DID_pkey_to_did (pkey);
   GNUNET_asprintf (&verify_id_str, "%s#key-1", did_str);
 
-  pkey_multibase_str = DID_key_covert_gnunet_to_multibase_base64 (pkey);
+  pkey_multibase_str = DID_key_convert_gnunet_to_multibase_base64 (pkey);
 
   didd_json = json_pack (
     "{s:[ss], s:s, s:[{s:s, s:s, s:s, s:s}], s:[s], s:[s]}",
diff --git a/src/reclaim/did_helper.h b/src/reclaim/did_helper.h
index 5cad48ca8..fea86af5e 100644
--- a/src/reclaim/did_helper.h
+++ b/src/reclaim/did_helper.h
@@ -52,13 +52,13 @@ DID_did_to_pkey (const char *did, struct 
GNUNET_IDENTITY_PublicKey *pkey);
 //  * @brief Convert a base 64 encoded public key to a GNUNET key
 //  */
 // struct GNUNET_IDENTITY_PublicKey *
-// GNUNET_DID_key_covert_multibase_base64_to_gnunet(char *);
+// GNUNET_DID_key_convert_multibase_base64_to_gnunet(char *);
 
 /**
  * @brief Convert GNUNET key to a base 64 encoded public key
  */
 char *
-DID_key_covert_gnunet_to_multibase_base64 (struct
+DID_key_convert_gnunet_to_multibase_base64 (struct
                                                   GNUNET_IDENTITY_PublicKey *);
 
 /**
diff --git a/src/reclaim/gnunet-reclaim.c b/src/reclaim/gnunet-reclaim.c
index da5f90409..cb8703495 100644
--- a/src/reclaim/gnunet-reclaim.c
+++ b/src/reclaim/gnunet-reclaim.c
@@ -218,7 +218,10 @@ do_cleanup (void *cls)
   if (NULL != identity_handle)
     GNUNET_IDENTITY_disconnect (identity_handle);
   if (NULL != attr_list)
-    GNUNET_free (attr_list);
+  {
+    GNUNET_RECLAIM_attribute_list_destroy (attr_list);
+    attr_list = NULL;
+  }
   if (NULL != attr_to_delete)
     GNUNET_free (attr_to_delete);
   if (NULL == credential_type)
diff --git a/src/reclaim/test_did_helper.c b/src/reclaim/test_did_helper.c
index 446c199fc..02db28925 100644
--- a/src/reclaim/test_did_helper.c
+++ b/src/reclaim/test_did_helper.c
@@ -69,6 +69,7 @@ test_GNUNET_DID_pkey_to_did ()
   char *str_did;
   str_did = DID_pkey_to_did (&test_pkey);
   GNUNET_assert (strcmp ((char *) test_did, str_did) == 0);
+  GNUNET_free (str_did);
 }
 
 void
@@ -84,15 +85,16 @@ test_GNUNET_DID_did_to_pkey ()
 }
 
 // void
-// test_GNUNET_DID_key_covert_multibase_base64_to_gnunet ();
+// test_GNUNET_DID_key_convert_multibase_base64_to_gnunet ();
 
 void
-test_GNUNET_DID_key_covert_gnunet_to_multibase_base64 ()
+test_GNUNET_DID_key_convert_gnunet_to_multibase_base64 ()
 {
   char *multibase_key;
-  multibase_key = DID_key_covert_gnunet_to_multibase_base64 (&test_pkey);
+  multibase_key = DID_key_convert_gnunet_to_multibase_base64 (&test_pkey);
 
   GNUNET_assert (strcmp (test_multibase_key, multibase_key) == 0);
+  GNUNET_free (multibase_key);
 }
 
 void
@@ -102,6 +104,8 @@ test_GNUNET_DID_pkey_to_did_document ()
   char *did_document_str = DID_pkey_to_did_document (&test_pkey);
   did_document = json_loads (did_document_str, JSON_DECODE_ANY, NULL);
   GNUNET_assert (json_equal (test_did_document, did_document) == 1);
+  json_decref (did_document);
+  GNUNET_free (did_document_str);
 }
 
 int
@@ -127,6 +131,7 @@ main ()
   test_GNUNET_DID_pkey_to_did ();
   test_GNUNET_DID_did_to_pkey ();
   test_GNUNET_DID_pkey_to_did_document ();
-  test_GNUNET_DID_key_covert_gnunet_to_multibase_base64 ();
+  test_GNUNET_DID_key_convert_gnunet_to_multibase_base64 ();
+  json_decref (test_did_document);
   return 0;
 }
diff --git a/src/reclaim/test_reclaim_attribute.c 
b/src/reclaim/test_reclaim_attribute.c
index 0740812eb..acbcda62d 100644
--- a/src/reclaim/test_reclaim_attribute.c
+++ b/src/reclaim/test_reclaim_attribute.c
@@ -45,4 +45,5 @@ main (int argc, char *argv[])
   //GNUNET_assert (-1 != deser_len);
   GNUNET_free (ser_data);
   GNUNET_RECLAIM_attribute_list_destroy (al);
+  GNUNET_RECLAIM_attribute_list_destroy (al_two);
 }
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c
index f9a949e61..5163c2271 100644
--- a/src/rest/gnunet-rest-server.c
+++ b/src/rest/gnunet-rest-server.c
@@ -1193,6 +1193,7 @@ run (void *cls,
         GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
                                   "write",
                                   basic_auth_file);
+      GNUNET_free (basic_auth_file);
     }
     else
     {
@@ -1205,8 +1206,10 @@ run (void *cls,
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "Unable to read basic auth secret file.\n");
         GNUNET_SCHEDULER_shutdown ();
+        GNUNET_free (basic_auth_file);
         return;
       }
+      GNUNET_free (basic_auth_file);
       if (0 != getlogin_r (cuser, _POSIX_LOGIN_NAME_MAX))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index a0813ddcd..327b03494 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -427,20 +427,18 @@ check_signature_identity (const struct 
GNUNET_REVOCATION_PowP *pow,
   struct GNUNET_REVOCATION_SignaturePurposePS *spurp;
   unsigned char *sig;
   size_t ksize;
+  int ret;
 
   ksize = GNUNET_IDENTITY_public_key_get_length (key);
   spurp = REV_create_signature_message (pow);
   sig = ((unsigned char*) &pow[1] + ksize);
-  if (GNUNET_OK !=
-      GNUNET_IDENTITY_signature_verify_raw_ (
-        GNUNET_SIGNATURE_PURPOSE_REVOCATION,
-        &spurp->purpose,
-        sig,
-        key))
-  {
-    return GNUNET_SYSERR;
-  }
-  return GNUNET_OK;
+  ret =
+    GNUNET_IDENTITY_signature_verify_raw_ (GNUNET_SIGNATURE_PURPOSE_REVOCATION,
+                                           &spurp->purpose,
+                                           sig,
+                                           key);
+  GNUNET_free (spurp);
+  return ret == GNUNET_OK ? GNUNET_OK : GNUNET_SYSERR;
 }
 
 
@@ -588,6 +586,7 @@ sign_pow_identity (const struct GNUNET_IDENTITY_PrivateKey 
*key,
   int result = GNUNET_IDENTITY_sign_raw_ (key,
                                           &rp->purpose,
                                           (void*) sig);
+  GNUNET_free (rp);
   if (result == GNUNET_SYSERR)
     return GNUNET_NO;
   else
diff --git a/src/secretsharing/gnunet-secretsharing-profiler.c 
b/src/secretsharing/gnunet-secretsharing-profiler.c
index 76bba0bc9..432d6da89 100644
--- a/src/secretsharing/gnunet-secretsharing-profiler.c
+++ b/src/secretsharing/gnunet-secretsharing-profiler.c
@@ -446,7 +446,7 @@ session_disconnect_adapter (void *cls, void *op_result)
 /**
  * Callback to be called when the requested peer information is available
  *
- * @param cb_cls the closure from GNUNET_TETSBED_peer_get_information()
+ * @param cb_cls the closure from GNUNET_TESTBED_peer_get_information()
  * @param op the operation this callback corresponds to
  * @param pinfo the result; will be NULL if the operation has failed
  * @param emsg error message if the operation has failed; will be NULL if the
diff --git a/src/secretsharing/test_secretsharing_api.c 
b/src/secretsharing/test_secretsharing_api.c
index 227af1c3e..470bfddf4 100644
--- a/src/secretsharing/test_secretsharing_api.c
+++ b/src/secretsharing/test_secretsharing_api.c
@@ -45,6 +45,7 @@ secret_ready_cb (void *cls,
     success = 1;
   // FIXME: check that our share is valid, which we can do as there's only
   // one peer.
+  GNUNET_SECRETSHARING_share_destroy (my_share);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "secret ready, shutting down\n");
   GNUNET_SCHEDULER_shutdown ();
 }
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index 339d347f8..f85ddb224 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -1552,6 +1552,16 @@ check_byzantine_bounds (struct Operation *op)
 }
 
 
+static enum GNUNET_GenericReturnValue
+free_values_iter(void *cls,
+                 const struct GNUNET_HashCode *key,
+                 void *value)
+{
+  GNUNET_free (value);
+  return GNUNET_YES;
+}
+
+
 /* FIXME: the destroy logic is a mess and should be cleaned up! */
 
 /**
@@ -1605,6 +1615,19 @@ _GSS_operation_destroy (struct Operation *op)
     GNUNET_CONTAINER_multihashmap32_destroy (op->key_to_element);
     op->key_to_element = NULL;
   }
+  if (NULL != op->message_control_flow)
+  {
+    GNUNET_CONTAINER_multihashmap_iterate (op->message_control_flow,
+                                           &free_values_iter,
+                                           NULL);
+    GNUNET_CONTAINER_multihashmap_destroy (op->message_control_flow);
+    op->message_control_flow = NULL;
+  }
+  if (NULL != op->inquiries_sent)
+  {
+    GNUNET_CONTAINER_multihashmap_destroy (op->inquiries_sent);
+    op->inquiries_sent = NULL;
+  }
   if (NULL != set)
   {
     GNUNET_CONTAINER_DLL_remove (set->ops_head,
@@ -5043,7 +5066,7 @@ handle_client_evaluate (void *cls,
 #endif
 
   /* Advance generation values, so that
-     mutations won't interfer with the running operation. */
+     mutations won't interfere with the running operation. */
   op->set = set;
   op->generation_created = set->current_generation;
   advance_generation (set);
diff --git a/src/setu/gnunet-service-setu_protocol.h 
b/src/setu/gnunet-service-setu_protocol.h
index c2a166e60..c896166ce 100644
--- a/src/setu/gnunet-service-setu_protocol.h
+++ b/src/setu/gnunet-service-setu_protocol.h
@@ -218,7 +218,7 @@ struct StrataEstimatorMessage
   /**
    * Size of the local set
    */
-  uint64_t set_size;
+  uint64_t set_size GNUNET_PACKED;
 };
 
 
diff --git a/src/setu/gnunet-service-setu_strata_estimator.c 
b/src/setu/gnunet-service-setu_strata_estimator.c
index 7981cc847..43ccf3afd 100644
--- a/src/setu/gnunet-service-setu_strata_estimator.c
+++ b/src/setu/gnunet-service-setu_strata_estimator.c
@@ -85,7 +85,8 @@ salt_key (const struct IBF_Key *k_in,
   uint64_t x = k_in->key_val;
 
   /* rotate ibf key */
-  x = (x >> s) | (x << (64 - s));
+  if (s > 0)
+    x = (x >> s) | (x << (64 - s));
   k_out->key_val = x;
 }
 
diff --git a/src/testbed/test_testbed_api.c b/src/testbed/test_testbed_api.c
index a46a7596a..ffc98f42c 100644
--- a/src/testbed/test_testbed_api.c
+++ b/src/testbed/test_testbed_api.c
@@ -265,7 +265,7 @@ service_connect_comp_cb (void *cls,
 /**
  * Callback to be called when the requested peer information is available
  *
- * @param cb_cls the closure from GNUNET_TETSBED_peer_get_information()
+ * @param cb_cls the closure from GNUNET_TESTBED_peer_get_information()
  * @param op the operation this callback corresponds to
  * @param pinfo the result; will be NULL if the operation has failed
  * @param emsg error message if the operation has failed; will be NULL if the
diff --git a/src/testbed/test_testbed_api_test.c 
b/src/testbed/test_testbed_api_test.c
index f451c6555..1728badc1 100644
--- a/src/testbed/test_testbed_api_test.c
+++ b/src/testbed/test_testbed_api_test.c
@@ -118,7 +118,7 @@ do_abort (void *cls)
 /**
  * Callback to be called when the requested peer information is available
  *
- * @param cb_cls the closure from GNUNET_TETSBED_peer_get_information()
+ * @param cb_cls the closure from GNUNET_TESTBED_peer_get_information()
  * @param op the operation this callback corresponds to
  * @param pinfo the result; will be NULL if the operation has failed
  * @param emsg error message if the operation has failed; will be NULL if the
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c
index 2ae0a1703..ee7aac9b7 100644
--- a/src/testbed/testbed_api.c
+++ b/src/testbed/testbed_api.c
@@ -1945,7 +1945,7 @@ GNUNET_TESTBED_overlay_write_topology_to_file (
  * want to use this in testing
  *
  * @param trusted_ip the ip address of the controller which will be set as 
TRUSTED
- *          HOST(all connections form this ip are permitted by the testbed) 
when
+ *          HOST(all connections from this ip are permitted by the testbed) 
when
  *          starting testbed controller at host. This can either be a single ip
  *          address or a network address in CIDR notation.
  * @param hostname the hostname of the destination this message is intended for
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c
index 824bd0187..2919b8b75 100644
--- a/src/testbed/testbed_api_hosts.c
+++ b/src/testbed/testbed_api_hosts.c
@@ -792,7 +792,7 @@ free_argv (char **argv)
  * be set locally in the function from its parameteres. If the environmental
  * variable is not found then it defaults to `ssh -o BatchMode=yes -o
  * NoHostAuthenticationForLocalhost=yes -o StrictHostkeyChecking=no -o
- * PasswordAuthentication=noc'
+ * PasswordAuthentication=no'
  *
  * @param port the destination port number
  * @param hostname the hostname of the target host
@@ -872,7 +872,7 @@ gen_rsh_args (const char *port, const char *hostname, const 
char *username)
 /**
  * Generates the arguments needed for executing the given binary in a remote
  * shell. Builds the arguments from the environmental variable
- * GNUNET_TETSBED_RSH_CMD_SUFFIX. If the environmental variable is not found,
+ * GNUNET_TESTBED_RSH_CMD_SUFFIX. If the environmental variable is not found,
  * only the given binary name will be present in the returned arguments
  *
  * @param append_args the arguments to append after generating the suffix
@@ -1054,7 +1054,7 @@ GNUNET_TESTBED_controller_start (const char *trusted_ip,
   host->locked = GNUNET_YES;
   API_VIOLATION (
     GNUNET_NO == host->controller_started,
-    "Attempting to start a controller on a host which is already started a 
controller");
+    "Attempting to start a controller on a host on which a controller is 
already started");
   cp = GNUNET_new (struct GNUNET_TESTBED_ControllerProc);
   if (0 == GNUNET_TESTBED_host_get_id_ (host))
   {
@@ -1339,6 +1339,7 @@ GNUNET_TESTBED_is_host_habitable (
   if (NULL == h->auxp)
   {
     GNUNET_break (0);  /* Cannot exec SSH? */
+    free_argv (h->helper_argv);
     GNUNET_free (h);
     return NULL;
   }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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