aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/channel.h2
-rw-r--r--src/or/conscache.h2
-rw-r--r--src/or/entrynodes.h3
-rw-r--r--src/or/policies.c4
4 files changed, 9 insertions, 2 deletions
diff --git a/src/or/channel.h b/src/or/channel.h
index 32336fe1d2..e23d707915 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -719,6 +719,8 @@ int packed_cell_is_destroy(channel_t *chan,
/* Declare the handle helpers */
HANDLE_DECL(channel, channel_s,)
+#define channel_handle_free(h) \
+ FREE_AND_NULL(channel_handle, (h))
#endif /* !defined(TOR_CHANNEL_H) */
diff --git a/src/or/conscache.h b/src/or/conscache.h
index 3c89dedf43..e4f308fa49 100644
--- a/src/or/conscache.h
+++ b/src/or/conscache.h
@@ -10,6 +10,8 @@ typedef struct consensus_cache_entry_t consensus_cache_entry_t;
typedef struct consensus_cache_t consensus_cache_t;
HANDLE_DECL(consensus_cache_entry, consensus_cache_entry_t, )
+#define consensus_cache_entry_handle_free(h) \
+ FREE_AND_NULL(consensus_cache_entry_handle, (h))
consensus_cache_t *consensus_cache_open(const char *subdir, int max_entries);
void consensus_cache_free(consensus_cache_t *cache);
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h
index 3ca966bc78..d7f4967a0c 100644
--- a/src/or/entrynodes.h
+++ b/src/or/entrynodes.h
@@ -476,6 +476,9 @@ STATIC double get_meaningful_restriction_threshold(void);
STATIC double get_extreme_restriction_threshold(void);
HANDLE_DECL(entry_guard, entry_guard_t, STATIC)
+#define entry_guard_handle_free(h) \
+ FREE_AND_NULL(entry_guard_handle, (h))
+
STATIC guard_selection_type_t guard_selection_infer_type(
guard_selection_type_t type_in,
const char *name);
diff --git a/src/or/policies.c b/src/or/policies.c
index 1f80130710..2e584095db 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -1792,14 +1792,14 @@ policies_parse_exit_policy_reject_private(
/* Reject public IPv4 addresses on any interface */
public_addresses = get_interface_address6_list(LOG_INFO, AF_INET, 0);
addr_policy_append_reject_addr_list_filter(dest, public_addresses, 1, 0);
- free_interface_address6_list(public_addresses);
+ interface_address6_list_free(public_addresses);
/* Don't look for IPv6 addresses if we're configured as IPv4-only */
if (ipv6_exit) {
/* Reject public IPv6 addresses on any interface */
public_addresses = get_interface_address6_list(LOG_INFO, AF_INET6, 0);
addr_policy_append_reject_addr_list_filter(dest, public_addresses, 0, 1);
- free_interface_address6_list(public_addresses);
+ interface_address6_list_free(public_addresses);
}
}