[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: TRANSPORT/HOSTLIST: Fix crashing service
From: |
gnunet |
Subject: |
[gnunet] branch master updated: TRANSPORT/HOSTLIST: Fix crashing services; code smells still exist |
Date: |
Wed, 25 Oct 2023 14:57:51 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 99118ccc8 TRANSPORT/HOSTLIST: Fix crashing services; code smells still
exist
99118ccc8 is described below
commit 99118ccc8214ea2ac3566bbe1e4fb81258f5b056
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Oct 25 14:57:45 2023 +0200
TRANSPORT/HOSTLIST: Fix crashing services; code smells still exist
---
src/service/hostlist/gnunet-daemon-hostlist_client.c | 5 +++--
src/service/transport/gnunet-service-transport.c | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/service/hostlist/gnunet-daemon-hostlist_client.c
b/src/service/hostlist/gnunet-daemon-hostlist_client.c
index 483233fc6..3f963332d 100644
--- a/src/service/hostlist/gnunet-daemon-hostlist_client.c
+++ b/src/service/hostlist/gnunet-daemon-hostlist_client.c
@@ -415,7 +415,8 @@ callback_download (void *ptr, size_t size, size_t nmemb,
void *ctx)
msg,
shc_cont,
NULL);
- GNUNET_CONTAINER_DLL_insert (shc_head, shc_tail, shc);
+ if (NULL != shc)
+ GNUNET_CONTAINER_DLL_insert (shc_head, shc_tail, shc);
memmove (download_buffer, &download_buffer[msize], download_pos - msize);
download_pos -= msize;
}
@@ -1753,7 +1754,7 @@ void
GNUNET_HOSTLIST_client_stop ()
{
struct GNUNET_PEERSTORE_StoreHelloContext *pos;
-
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Hostlist client shutdown\n");
while (NULL != (pos = shc_head))
{
diff --git a/src/service/transport/gnunet-service-transport.c
b/src/service/transport/gnunet-service-transport.c
index a1848fbb1..a09eac11e 100644
--- a/src/service/transport/gnunet-service-transport.c
+++ b/src/service/transport/gnunet-service-transport.c
@@ -3892,6 +3892,8 @@ free_address_list_entry (struct AddressListEntry *ale)
GNUNET_SCHEDULER_cancel (ale->st);
ale->st = NULL;
}
+ if (NULL != ale->signed_address)
+ GNUNET_free (ale->signed_address);
GNUNET_free (ale);
}
@@ -5506,8 +5508,6 @@ shc_cont (void *cls, int success)
GNUNET_PEERSTORE_STOREOPTION_MULTIPLE,
&peerstore_store_own_cb,
ale);
- GNUNET_free (ale->signed_address);
- GNUNET_free (ale);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: TRANSPORT/HOSTLIST: Fix crashing services; code smells still exist,
gnunet <=