[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: Fix memory leak and use-aft
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: Fix memory leak and use-after-free |
Date: |
Mon, 13 Nov 2017 05:02:44 +0100 |
This is an automated email from the git hooks/post-receive script.
david-barksdale pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 16e4f0c52 Fix memory leak and use-after-free
16e4f0c52 is described below
commit 16e4f0c52cf2303b02725b69ae16be494a147c56
Author: David Barksdale <address@hidden>
AuthorDate: Sun Nov 12 21:46:16 2017 -0600
Fix memory leak and use-after-free
---
src/transport/gnunet-service-transport.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/transport/gnunet-service-transport.c
b/src/transport/gnunet-service-transport.c
index ec4d82164..6b354df98 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -541,6 +541,13 @@ client_disconnect_cb (void *cls,
GNUNET_CONTAINER_multipeermap_iterate (active_stccs,
&mark_match_down,
tc);
+ for (struct AddressToStringContext *cur = a2s_head;
+ NULL != cur;
+ cur = cur->next)
+ {
+ if (cur->tc == tc)
+ cur->tc = NULL;
+ }
GNUNET_CONTAINER_DLL_remove (clients_head,
clients_tail,
tc);
@@ -864,6 +871,8 @@ transmit_address_to_client (void *cls,
GNUNET_assert ( (GNUNET_OK == res) ||
(GNUNET_SYSERR == res) );
+ if (NULL == actx->tc)
+ return;
if (NULL == buf)
{
env = GNUNET_MQ_msg (atsm,
@@ -878,6 +887,7 @@ transmit_address_to_client (void *cls,
GNUNET_CONTAINER_DLL_remove (a2s_head,
a2s_tail,
actx);
+ GNUNET_free (actx);
return;
}
if (GNUNET_SYSERR == res)
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: Fix memory leak and use-after-free,
gnunet <=