summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-07 10:52:28 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-07 10:52:28 -0500
commit129cee1c7511edd82dae77cf2946b147e4eed887 (patch)
treec62d580d8d67c4ecd4a721b5109904816907fc31 /src/common
parent41adfd6fa38bf94bc7d71174dbaf7f32a41a64ec (diff)
parentd6ca36defa25e0d77718731924195cc244a18b11 (diff)
downloadtor-129cee1c7511edd82dae77cf2946b147e4eed887.tar.gz
tor-129cee1c7511edd82dae77cf2946b147e4eed887.zip
Merge branch 'maint-0.2.9'
Diffstat (limited to 'src/common')
-rw-r--r--src/common/sandbox.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index 24ba8a2997..ebc843e130 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -1579,13 +1579,14 @@ sandbox_add_addrinfo(const char *name)
void
sandbox_free_getaddrinfo_cache(void)
{
- cached_getaddrinfo_item_t **next, **item;
+ cached_getaddrinfo_item_t **next, **item, *this;
for (item = HT_START(getaddrinfo_cache, &getaddrinfo_cache);
item;
item = next) {
+ this = *item;
next = HT_NEXT_RMV(getaddrinfo_cache, &getaddrinfo_cache, item);
- cached_getaddrinfo_item_free(*item);
+ cached_getaddrinfo_item_free(this);
}
HT_CLEAR(getaddrinfo_cache, &getaddrinfo_cache);