[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: fix memory leak
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: fix memory leak |
Date: |
Thu, 04 Jan 2018 21:51:55 +0100 |
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 284737536 fix memory leak
284737536 is described below
commit 2847375361c620cbd6498fef5f051955786edb59
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Jan 4 21:51:53 2018 +0100
fix memory leak
---
src/include/gnunet_set_service.h | 3 +++
src/revocation/gnunet-service-revocation.c | 9 ++++++---
src/testbed/gnunet-daemon-testbed-blacklist.c | 4 +++-
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h
index a2999aebc..0c14aa945 100644
--- a/src/include/gnunet_set_service.h
+++ b/src/include/gnunet_set_service.h
@@ -530,6 +530,7 @@ GNUNET_SET_iterate (struct GNUNET_SET_Handle *set,
GNUNET_SET_ElementIterator iter,
void *iter_cls);
+
/**
* Stop iteration over all elements in the given set. Can only
* be called before the iteration has "naturally" completed its
@@ -540,6 +541,7 @@ GNUNET_SET_iterate (struct GNUNET_SET_Handle *set,
void
GNUNET_SET_iterate_cancel (struct GNUNET_SET_Handle *set);
+
/**
* Create a copy of an element. The copy
* must be GNUNET_free-d by the caller.
@@ -550,6 +552,7 @@ GNUNET_SET_iterate_cancel (struct GNUNET_SET_Handle *set);
struct GNUNET_SET_Element *
GNUNET_SET_element_dup (const struct GNUNET_SET_Element *element);
+
/**
* Hash a set element.
*
diff --git a/src/revocation/gnunet-service-revocation.c
b/src/revocation/gnunet-service-revocation.c
index 8281e9a16..23f654141 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -759,7 +759,11 @@ handle_revocation_union_request (void *cls,
{
peer_entry = new_peer_entry (other_peer);
}
- GNUNET_assert (NULL == peer_entry->so);
+ if (NULL != peer_entry->so)
+ {
+ GNUNET_break_op (0);
+ return;
+ }
peer_entry->so = GNUNET_SET_accept (request,
GNUNET_SET_RESULT_ADDED,
(struct GNUNET_SET_Option[]) {{ 0 }},
@@ -769,8 +773,7 @@ handle_revocation_union_request (void *cls,
GNUNET_SET_commit (peer_entry->so,
revocation_set))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("SET service crashed, terminating revocation service\n"));
+ GNUNET_break (0);
GNUNET_SCHEDULER_shutdown ();
return;
}
diff --git a/src/testbed/gnunet-daemon-testbed-blacklist.c
b/src/testbed/gnunet-daemon-testbed-blacklist.c
index f2f96ee09..3ebe20258 100644
--- a/src/testbed/gnunet-daemon-testbed-blacklist.c
+++ b/src/testbed/gnunet-daemon-testbed-blacklist.c
@@ -190,7 +190,8 @@ run (void *cls,
char *fname;
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (c, "PATHS",
+ GNUNET_CONFIGURATION_get_value_filename (c,
+ "PATHS",
"GNUNET_HOME",
&shome))
{
@@ -208,6 +209,7 @@ run (void *cls,
GNUNET_free (fname);
return;
}
+ GNUNET_free (fname);
GNUNET_asprintf (&fname,
"%s/blacklist",
shome);
--
To stop receiving notification emails like this one, please contact
address@hidden