diff options
author | Roger Dingledine <arma@torproject.org> | 2005-05-18 03:42:46 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-05-18 03:42:46 +0000 |
commit | fe78aac02701a118e49e5a23707e5b3d4ad55182 (patch) | |
tree | 1ac948e8530f75081da4276a8dda491d5e15d3bc | |
parent | e7354725bb04783531fc5cbdf6413515798b236f (diff) | |
download | tor-fe78aac02701a118e49e5a23707e5b3d4ad55182.tar.gz tor-fe78aac02701a118e49e5a23707e5b3d4ad55182.zip |
fix seg faults when router_load_single_router fails
svn:r4265
-rw-r--r-- | src/or/routerlist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index c66fd0a7c2..6743e15285 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -916,13 +916,13 @@ router_load_single_router(const char *s, const char **msg) } if (router_is_me(ri)) { log_fn(LOG_WARN, "Router's identity key matches mine; dropping."); - if (msg && !*msg) *msg = "Router's identity key matches mine."; + if (msg) *msg = "Router's identity key matches mine."; routerinfo_free(ri); return 0; } if (router_resolve(ri)<0) { log_fn(LOG_WARN, "Couldn't resolve router address; dropping."); - if (msg && !*msg) *msg = "Couldn't resolve router address."; + if (msg) *msg = "Couldn't resolve router address."; routerinfo_free(ri); return 0; } @@ -934,7 +934,7 @@ router_load_single_router(const char *s, const char **msg) } if (router_add_to_routerlist(ri, msg)<0) { log_fn(LOG_WARN, "Couldn't add router to list; dropping."); - if (msg && !*msg) *msg = "Couldn't add router to list."; + if (msg) *msg = "Couldn't add router to list."; /* ri is already freed */ return 0; } else { |