aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nat/nat_auto.c4
-rw-r--r--src/regex/perf-regex.c4
-rw-r--r--src/regex/test_regex_eval_api.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/nat/nat_auto.c b/src/nat/nat_auto.c
index eb169208ac..baa1cc78d9 100644
--- a/src/nat/nat_auto.c
+++ b/src/nat/nat_auto.c
@@ -322,8 +322,8 @@ nipo (void *cls, const char *name, int isDefault, const struct sockaddr *addr,
if (!isDefault)
return GNUNET_OK;
if ( (sizeof (struct sockaddr_in6) == addrlen) &&
- (0 != memcmp (&in6addr_loopback, addr,
- addrlen)) &&
+ (0 != memcmp (&in6addr_loopback, &((const struct sockaddr_in6 *) addr)->sin6_addr,
+ sizeof (struct in6_addr))) &&
(! IN6_IS_ADDR_LINKLOCAL(&((const struct sockaddr_in6 *) addr)->sin6_addr)) )
{
ah->have_v6 = GNUNET_YES;
diff --git a/src/regex/perf-regex.c b/src/regex/perf-regex.c
index 49a50cb8a9..9f510b154e 100644
--- a/src/regex/perf-regex.c
+++ b/src/regex/perf-regex.c
@@ -82,9 +82,9 @@ main (int argc, char *const *argv)
dfa = GNUNET_REGEX_construct_dfa (regex, size, compression);
GNUNET_REGEX_automaton_destroy (dfa);
GNUNET_free (buffer);
- for (i=0;i<nr;i++)
+ for (i=0;NULL != regexes[i];i++)
GNUNET_free_non_null (regexes[i]);
- GNUNET_array_grow (regexes, nr, 0);
+ GNUNET_free (regexes);
return 0;
}
diff --git a/src/regex/test_regex_eval_api.c b/src/regex/test_regex_eval_api.c
index d870898682..ce6f923157 100644
--- a/src/regex/test_regex_eval_api.c
+++ b/src/regex/test_regex_eval_api.c
@@ -164,6 +164,8 @@ test_random (unsigned int rx_length, unsigned int max_str_len,
}
GNUNET_free (canonical_regex);
GNUNET_free (matching_str);
+ canonical_regex = NULL;
+ matching_str = NULL;
}
GNUNET_free (rand_rx);