projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve use of compiler attributes
[tinc]
/
src
/
address_cache.c
diff --git
a/src/address_cache.c
b/src/address_cache.c
index
e17f896
..
d9996fb
100644
(file)
--- a/
src/address_cache.c
+++ b/
src/address_cache.c
@@
-32,7
+32,7
@@
static struct addrinfo *get_known_addresses(node_t *n) {
struct addrinfo *ai = NULL;
struct addrinfo *oai = NULL;
struct addrinfo *ai = NULL;
struct addrinfo *oai = NULL;
- for splay_each(edge_t, e, n->edge_tree) {
+ for splay_each(edge_t, e,
&
n->edge_tree) {
if(!e->reverse) {
continue;
}
if(!e->reverse) {
continue;
}
@@
-213,7
+213,9
@@
const sockaddr_t *get_recent_address(address_cache_t *cache) {
}
// We're all out of addresses.
}
// We're all out of addresses.
- exit_configuration(&cache->config_tree);
+ exit_configuration(cache->config_tree);
+ cache->config_tree = NULL;
+
return false;
}
return false;
}
@@
-255,7
+257,8
@@
void reset_address_cache(address_cache_t *cache, const sockaddr_t *sa) {
}
if(cache->config_tree) {
}
if(cache->config_tree) {
- exit_configuration(&cache->config_tree);
+ exit_configuration(cache->config_tree);
+ cache->config_tree = NULL;
}
if(cache->ai) {
}
if(cache->ai) {
@@
-271,7
+274,8
@@
void reset_address_cache(address_cache_t *cache, const sockaddr_t *sa) {
void close_address_cache(address_cache_t *cache) {
if(cache->config_tree) {
void close_address_cache(address_cache_t *cache) {
if(cache->config_tree) {
- exit_configuration(&cache->config_tree);
+ exit_configuration(cache->config_tree);
+ cache->config_tree = NULL;
}
if(cache->ai) {
}
if(cache->ai) {