mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-19 18:00:33 +01:00
Merge branch 'bug20710_025' into maint-0.2.9
This commit is contained in:
commit
d6ca36defa
4
changes/bug20710_025
Normal file
4
changes/bug20710_025
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes (memory leak, use-after-free, linux seccomp2 sandbox):
|
||||||
|
- Fix a memory leak and use-after-free error when removing entries
|
||||||
|
from the sandbox's getaddrinfo() cache. Fixes bug 20710; bugfix on
|
||||||
|
0.2.5.5-alpha. Patch from "cypherpunks".
|
@ -1579,13 +1579,14 @@ sandbox_add_addrinfo(const char *name)
|
|||||||
void
|
void
|
||||||
sandbox_free_getaddrinfo_cache(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);
|
for (item = HT_START(getaddrinfo_cache, &getaddrinfo_cache);
|
||||||
item;
|
item;
|
||||||
item = next) {
|
item = next) {
|
||||||
|
this = *item;
|
||||||
next = HT_NEXT_RMV(getaddrinfo_cache, &getaddrinfo_cache, 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);
|
HT_CLEAR(getaddrinfo_cache, &getaddrinfo_cache);
|
||||||
|
Loading…
Reference in New Issue
Block a user