mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
plug another memory leak
svn:r3104
This commit is contained in:
parent
a6aa5eebd6
commit
5d961c2c06
@ -450,8 +450,11 @@ routerlist_sl_choose_by_bandwidth(smartlist_t *sl)
|
||||
total_bw += this_bw;
|
||||
// log_fn(LOG_INFO,"Recording bw %d for node %s.", this_bw, router->nickname);
|
||||
}
|
||||
if (!total_bw)
|
||||
if (!total_bw) {
|
||||
SMARTLIST_FOREACH(bandwidths, uint32_t*, p, tor_free(p));
|
||||
smartlist_free(bandwidths);
|
||||
return smartlist_choose(sl);
|
||||
}
|
||||
rand_bw = crypto_pseudo_rand_int(total_bw);
|
||||
// log_fn(LOG_INFO,"Total bw %d. Randomly chose %d.", total_bw, rand_bw);
|
||||
tmp = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user