gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: fix leak


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix leak
Date: Fri, 06 Oct 2017 21:17:58 +0200

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

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 79ddc4888 fix leak
79ddc4888 is described below

commit 79ddc4888a3003ddbe45f1552dac3fea5e0741d4
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Oct 6 21:17:56 2017 +0200

    fix leak
---
 src/ats-tool/gnunet-ats.c               | 6 +++---
 src/conversation/gnunet-conversation.c  | 2 +-
 src/core/gnunet-service-core_sessions.c | 1 +
 src/dns/dnsparser.c                     | 4 ++--
 src/testbed/testbed_api_topology.c      | 2 +-
 src/topology/friends.c                  | 2 +-
 6 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c
index 5ec7693b1..d88e6d523 100644
--- a/src/ats-tool/gnunet-ats.c
+++ b/src/ats-tool/gnunet-ats.c
@@ -872,8 +872,8 @@ run (void *cls,
 
     for (c = 0; c < strlen (opt_type_str); c++)
     {
-      if (isupper (opt_type_str[c]))
-        opt_type_str[c] = tolower (opt_type_str[c]);
+      if (isupper ((unsigned char) opt_type_str[c]))
+        opt_type_str[c] = tolower ((unsigned char) opt_type_str[c]);
     }
 
     if (0 == strcasecmp ("latency", opt_type_str))
@@ -974,7 +974,7 @@ main (int argc,
                                   gettext_noop ("set preference for the given 
peer"),
                                   &opt_set_pref),
 
-    GNUNET_GETOPT_option_flag ('q', 
+    GNUNET_GETOPT_option_flag ('q',
                                   "quotas",
                                   gettext_noop ("print all configured quotas"),
                                   &opt_print_quotas),
diff --git a/src/conversation/gnunet-conversation.c 
b/src/conversation/gnunet-conversation.c
index 8f9ddec25..00ab65680 100644
--- a/src/conversation/gnunet-conversation.c
+++ b/src/conversation/gnunet-conversation.c
@@ -1091,7 +1091,7 @@ handle_command_string (char *message,
                             strlen (commands[i].command))))
     i++;
   ptr = &message[strlen (commands[i].command)];
-  while (isspace ((int) *ptr))
+  while (isspace ((unsigned char) *ptr))
     ptr++;
   if ('\0' == *ptr)
     ptr = NULL;
diff --git a/src/core/gnunet-service-core_sessions.c 
b/src/core/gnunet-service-core_sessions.c
index 034f2e883..5d34b7c26 100644
--- a/src/core/gnunet-service-core_sessions.c
+++ b/src/core/gnunet-service-core_sessions.c
@@ -975,6 +975,7 @@ GSC_SESSIONS_set_typemap (const struct GNUNET_PeerIdentity 
*peer,
   session = find_session (peer);
   if (NULL == session)
   {
+    GSC_TYPEMAP_destroy (nmap);
     GNUNET_break (0);
     return;
   }
diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c
index 36b4c36f1..30d9245ff 100644
--- a/src/dns/dnsparser.c
+++ b/src/dns/dnsparser.c
@@ -1278,8 +1278,8 @@ GNUNET_DNSPARSER_hex_to_bin (const char *hex,
   in[2] = '\0';
   for (off = 0; off < data_size; off++)
   {
-    in[0] = tolower ((int) hex[off * 2]);
-    in[1] = tolower ((int) hex[off * 2 + 1]);
+    in[0] = tolower ((unsigned char) hex[off * 2]);
+    in[1] = tolower ((unsigned char) hex[off * 2 + 1]);
     if (1 != sscanf (in, "%x", &h))
       return off;
     idata[off] = (uint8_t) h;
diff --git a/src/testbed/testbed_api_topology.c 
b/src/testbed/testbed_api_topology.c
index 7bc36d1b4..7d0ccd269 100644
--- a/src/testbed/testbed_api_topology.c
+++ b/src/testbed/testbed_api_topology.c
@@ -1051,7 +1051,7 @@ gen_topo_from_file (struct TopologyContext *tc,
   state = PEER_INDEX;
   while (offset < fs)
   {
-    if (0 != isspace (data[offset]))
+    if (0 != isspace ((unsigned char) data[offset]))
     {
       offset++;
       continue;
diff --git a/src/topology/friends.c b/src/topology/friends.c
index a960fad17..65f2700bb 100644
--- a/src/topology/friends.c
+++ b/src/topology/friends.c
@@ -95,7 +95,7 @@ GNUNET_FRIENDS_parse (const struct 
GNUNET_CONFIGURATION_Handle *cfg,
   pos = 0;
   while (pos < fsize)
   {
-    while ((pos < fsize) && (! isspace ((int) data[pos])))
+    while ((pos < fsize) && (! isspace ((unsigned char) data[pos])))
       pos++;
     if (GNUNET_OK !=
         GNUNET_CRYPTO_eddsa_public_key_from_string (&data[start],

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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