projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d337f7
)
fix use-after-free
author
Christian Grothoff
<christian@grothoff.org>
Tue, 4 Jun 2019 21:34:50 +0000
(23:34 +0200)
committer
Christian Grothoff
<christian@grothoff.org>
Tue, 4 Jun 2019 21:34:50 +0000
(23:34 +0200)
src/ats/plugin_ats2_simple.c
patch
|
blob
|
history
diff --git
a/src/ats/plugin_ats2_simple.c
b/src/ats/plugin_ats2_simple.c
index 7d5aebdfa6851b603b0765b296487b3c27eed35a..14bd2b99d546831d62076a59c7f1fb2290e42967 100644
(file)
--- a/
src/ats/plugin_ats2_simple.c
+++ b/
src/ats/plugin_ats2_simple.c
@@
-520,7
+520,6
@@
watch_cb (void *cls,
hello->nt = nt;
hello->peer = p;
memcpy (&hello[1], addr, alen);
- GNUNET_free (addr);
GNUNET_CONTAINER_DLL_insert (p->h_head, p->h_tail, hello);
/* check if sh for this HELLO already exists */
for (struct GNUNET_ATS_SessionHandle *sh = p->sh_head; NULL != sh;
@@
-533,6
+532,7
@@
watch_cb (void *cls,
hello->sh = sh;
break;
}
+ GNUNET_free (addr);
if (NULL == p->task)
p->task = GNUNET_SCHEDULER_add_now (&suggest_start_cb, p);
}