diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-03-27 05:27:47 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-03-27 05:27:47 +0000 |
commit | cd271dbca95c61d7eec062a7f5e00e1d3a21cfa0 (patch) | |
tree | 7e5c713b662f0f3f7eb12968957f86909407a229 | |
parent | c74bd877e221d67999f81844d33c45e9285f8410 (diff) | |
download | tor-cd271dbca95c61d7eec062a7f5e00e1d3a21cfa0.tar.gz tor-cd271dbca95c61d7eec062a7f5e00e1d3a21cfa0.zip |
re-order to avoid free-then-use. Thank goodness tor_free() zeroes things.
svn:r6249
-rw-r--r-- | src/or/routerlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 33f47684c6..8195aef5da 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -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. */ |