Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
8b01849f
Commit
8b01849f
authored
9 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Yet more memory leaks in the rendcache tests
parent
a5e873ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/or/rendcache.c
+1
-1
1 addition, 1 deletion
src/or/rendcache.c
src/or/rendcache.h
+2
-0
2 additions, 0 deletions
src/or/rendcache.h
src/test/test_rendcache.c
+7
-1
7 additions, 1 deletion
src/test/test_rendcache.c
with
10 additions
and
2 deletions
src/or/rendcache.c
+
1
−
1
View file @
8b01849f
...
...
@@ -157,7 +157,7 @@ rend_cache_failure_entry_free(rend_cache_failure_t *entry)
/** Helper: deallocate a rend_cache_failure_t. (Used with strmap_free(),
* which requires a function pointer whose argument is void*). */
static
void
STATIC
void
rend_cache_failure_entry_free_
(
void
*
entry
)
{
rend_cache_failure_entry_free
(
entry
);
...
...
This diff is collapsed.
Click to expand it.
src/or/rendcache.h
+
2
−
0
View file @
8b01849f
...
...
@@ -107,6 +107,8 @@ STATIC void cache_failure_intro_add(const uint8_t *identity,
rend_intro_point_failure_t
failure
);
STATIC
void
validate_intro_point_failure
(
const
rend_service_descriptor_t
*
desc
,
const
char
*
service_id
);
STATIC
void
rend_cache_failure_entry_free_
(
void
*
entry
);
#endif
#endif
/* TOR_RENDCACHE_H */
...
...
This diff is collapsed.
Click to expand it.
src/test/test_rendcache.c
+
7
−
1
View file @
8b01849f
...
...
@@ -439,6 +439,8 @@ test_rend_cache_lookup_v2_desc_as_dir(void *data)
NS_UNMOCK
(
hid_serv_responsible_for_desc_id
);
tor_free
(
mock_routerinfo
);
rend_cache_free_all
();
rend_encoded_v2_service_descriptor_free
(
desc_holder
);
tor_free
(
service_id
);
}
#undef NS_SUBMODULE
...
...
@@ -594,6 +596,8 @@ test_rend_cache_store_v2_desc_as_dir_with_different_time(void *data)
SMARTLIST_FOREACH
(
descs
,
rend_encoded_v2_service_descriptor_t
*
,
d
,
rend_encoded_v2_service_descriptor_free
(
d
));
smartlist_free
(
descs
);
rend_encoded_v2_service_descriptor_free
(
desc_holder_newer
);
rend_encoded_v2_service_descriptor_free
(
desc_holder_older
);
}
static
void
...
...
@@ -1026,6 +1030,7 @@ test_rend_cache_purge(void *data)
tt_int_op
(
strmap_size
(
rend_cache
),
OP_EQ
,
0
);
// Deals with existing rend_cache
rend_cache_free_all
();
rend_cache_init
();
our_rend_cache
=
rend_cache
;
...
...
@@ -1229,6 +1234,7 @@ test_rend_cache_failure_purge(void *data)
(
void
)
data
;
// Handles a null failure cache
strmap_free
(
rend_cache_failure
,
rend_cache_failure_entry_free_
);
rend_cache_failure
=
NULL
;
rend_cache_failure_purge
();
...
...
@@ -1236,7 +1242,7 @@ test_rend_cache_failure_purge(void *data)
tt_int_op
(
strmap_size
(
rend_cache_failure
),
OP_EQ
,
0
);
done:
(
void
)
0
;
rend_cache_free_all
()
;
}
static
void
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment