diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-01-11 13:44:10 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-01-16 15:02:51 -0500 |
commit | edcc9981d8b8894d2ef4e0d617a20d7d99547817 (patch) | |
tree | 44476ecc42282d66930fb659d27fc9ad3c5a74b6 /src/or/router.c | |
parent | 9c6d913b9e1b84ffcefb2cbd9cfe6f7bd15fc9b3 (diff) | |
download | tor-edcc9981d8b8894d2ef4e0d617a20d7d99547817.tar tor-edcc9981d8b8894d2ef4e0d617a20d7d99547817.tar.gz |
Try to use smartlist_add_asprintf consistently
(To ensure correctness, in every case, make sure that the temporary
variable is deleted, renamed, or lowered in scope, so we can't have
any bugs related to accidentally relying on the no-longer-filled
variable.)
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c index b2df3834f..7d9d2724f 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -2267,9 +2267,7 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo, smartlist_add(chunks, pre); if (geoip_is_loaded()) { - char *chunk=NULL; - tor_asprintf(&chunk, "geoip-db-digest %s\n", geoip_db_digest()); - smartlist_add(chunks, chunk); + smartlist_add_asprintf(chunks, "geoip-db-digest %s\n", geoip_db_digest()); } if (options->ExtraInfoStatistics && write_stats_to_extrainfo) { |