diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-02-28 03:37:27 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-02-28 03:37:27 +0000 |
commit | c5091e71340734be227dbb8eb1c5f70783c57e21 (patch) | |
tree | 5807754ee32bafc9734cb8ff42b4dbf3db898ab0 /src/or | |
parent | 97bc49bd72c20bf6ffae16e30941ccd7c15089d0 (diff) | |
download | tor-c5091e71340734be227dbb8eb1c5f70783c57e21.tar.gz tor-c5091e71340734be227dbb8eb1c5f70783c57e21.zip |
When copying routerinfo, copy descriptor too to prevent later double-free.
svn:r3711
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/routerlist.c | 2 |
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) |