add copy of MyFamily element to the descriptor, not the element itself

If we add the element itself, we will later free it when we free the
descriptor, and the next time we go to look at MyFamily, things will
go badly.

Fixes the rest of bug 22368; bugfix on 0.3.1.1-alpha.
This commit is contained in:
Roger Dingledine
2017-05-24 23:23:12 -04:00
parent a7e75ff796
commit d22d565331
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -2308,7 +2308,7 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
smartlist_add_strdup(warned_nonexistent_family, name);
}
if (is_legal) {
smartlist_add(ri->declared_family, name);
smartlist_add_strdup(ri->declared_family, name);
name = NULL;
}
} else if (router_digest_is_me(member->identity)) {