Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
36620ca0
Commit
36620ca0
authored
Jan 22, 2007
by
Nick Mathewson
🎨
Browse files
r9718@catbus: nickm | 2007-01-22 14:13:00 -0500
Free CACHE_STATE_DONE cached_router_t items on dns_free_all(). svn:r9386
parent
84790d05
Changes
2
Show whitespace changes
Inline
Side-by-side
ChangeLog
View file @
36620ca0
...
@@ -51,6 +51,8 @@ Changes in version 0.1.2.7-alpha - 2007-??-??
...
@@ -51,6 +51,8 @@ Changes in version 0.1.2.7-alpha - 2007-??-??
bytes.)
bytes.)
- Fix as-yet-unused reverse IPv6 lookup code so it sends nybbles in the
- Fix as-yet-unused reverse IPv6 lookup code so it sends nybbles in the
correct order.
correct order.
- Free memory held in recently-completed DNS lookup attempts on exit.
This was not a memory leak, but may have been hiding memory leaks.
Changes in version 0.1.2.6-alpha - 2007-01-09
Changes in version 0.1.2.6-alpha - 2007-01-09
...
...
src/or/dns.c
View file @
36620ca0
...
@@ -318,6 +318,21 @@ void
...
@@ -318,6 +318,21 @@ void
dns_free_all
(
void
)
dns_free_all
(
void
)
{
{
cached_resolve_t
**
ptr
,
**
next
,
*
item
;
cached_resolve_t
**
ptr
,
**
next
,
*
item
;
if
(
cached_resolve_pqueue
)
{
SMARTLIST_FOREACH
(
cached_resolve_pqueue
,
cached_resolve_t
*
,
res
,
{
/* XXXX012 The hach lookups here could be quite slow; remove them
* once we're happy. */
if
(
res
->
state
==
CACHE_STATE_DONE
)
{
cached_resolve_t
*
removed
=
HT_REMOVE
(
cache_map
,
&
cache_root
,
res
);
tor_assert
(
!
removed
);
_free_cached_resolve
(
res
);
}
else
{
cached_resolve_t
*
found
=
HT_FIND
(
cache_map
,
&
cache_root
,
res
);
tor_assert
(
found
);
}
});
}
for
(
ptr
=
HT_START
(
cache_map
,
&
cache_root
);
ptr
!=
NULL
;
ptr
=
next
)
{
for
(
ptr
=
HT_START
(
cache_map
,
&
cache_root
);
ptr
!=
NULL
;
ptr
=
next
)
{
item
=
*
ptr
;
item
=
*
ptr
;
next
=
HT_NEXT_RMV
(
cache_map
,
&
cache_root
,
ptr
);
next
=
HT_NEXT_RMV
(
cache_map
,
&
cache_root
,
ptr
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment