From c5091e71340734be227dbb8eb1c5f70783c57e21 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 28 Feb 2005 03:37:27 +0000 Subject: [PATCH] When copying routerinfo, copy descriptor too to prevent later double-free. svn:r3711 --- src/or/routerlist.c | 2 ++ 1 file changed, 2 insertions(+) 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)