re-order to avoid free-then-use. Thank goodness tor_free() zeroes things.

svn:r6249
This commit is contained in:
Nick Mathewson
2006-03-27 05:27:47 +00:00
parent c74bd877e2
commit cd271dbca9
+2 -2
View File
@@ -1542,11 +1542,11 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
/* Same key, but old */
log_debug(LD_DIR, "Skipping not-new descriptor for router '%s'",
router->nickname);
routerlist_insert_old(routerlist, router);
*msg = "Router descriptor was not new.";
/* Only journal this desc if we'll be serving it. */
if (!from_cache && get_options()->DirPort)
router_append_to_journal(&router->cache_info);
routerlist_insert_old(routerlist, router);
*msg = "Router descriptor was not new.";
return -1;
} else {
/* Same key, new. */