another coverity-found memory leak

svn:r17062
This commit is contained in:
Roger Dingledine 2008-10-12 03:21:05 +00:00
parent 95aace5aae
commit c9bddb24b2

View File

@ -2376,9 +2376,11 @@ entry_guards_prepend_from_config(void)
return;
}
if (options->EntryNodes)
log_info(LD_CIRC,"Adding configured EntryNodes '%s'.",
routerset_to_string(options->EntryNodes));
if (options->EntryNodes) {
char *string = routerset_to_string(options->EntryNodes);
log_info(LD_CIRC,"Adding configured EntryNodes '%s'.", string);
tor_free(string);
}
entry_routers = smartlist_create();
entry_fps = smartlist_create();