summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-02-28 03:37:27 +0000
committerNick Mathewson <nickm@torproject.org>2005-02-28 03:37:27 +0000
commitc5091e71340734be227dbb8eb1c5f70783c57e21 (patch)
tree5807754ee32bafc9734cb8ff42b4dbf3db898ab0 /src/or/routerlist.c
parent97bc49bd72c20bf6ffae16e30941ccd7c15089d0 (diff)
downloadtor-c5091e71340734be227dbb8eb1c5f70783c57e21.tar.gz
tor-c5091e71340734be227dbb8eb1c5f70783c57e21.zip
When copying routerinfo, copy descriptor too to prevent later double-free.
svn:r3711
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index dfd37363f1..e521cae011 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -694,6 +694,8 @@ routerinfo_t *routerinfo_copy(const routerinfo_t *router)
r->address = tor_strdup(r->address);
r->nickname = tor_strdup(r->nickname);
r->platform = tor_strdup(r->platform);
+ if (r->signed_descriptor)
+ r->signed_descriptor = tor_strdup(r->signed_descriptor);
if (r->onion_pkey)
r->onion_pkey = crypto_pk_dup_key(r->onion_pkey);
if (r->identity_pkey)