summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-09-10 13:46:14 +0200
committerDaniel Mack <github@zonque.org>2015-09-10 13:46:14 +0200
commitf33be3119806f96898dda6ade492fbdcdf8f79b8 (patch)
tree3c470fb770c5a19f848df0487f01af89b0aa6bea /src/resolve
parent89921f6ed085d77225204e160ce2cee99ed0c6fa (diff)
parent525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b (diff)
Merge pull request #1226 from poettering/coccinelle-fixes3
Third round of Coccinelle fixes
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-zone.c7
-rw-r--r--src/resolve/resolved-link.c3
2 files changed, 3 insertions, 7 deletions
diff --git a/src/resolve/resolved-dns-zone.c b/src/resolve/resolved-dns-zone.c
index 674bb6af28..8a59bd1c3c 100644
--- a/src/resolve/resolved-dns-zone.c
+++ b/src/resolve/resolved-dns-zone.c
@@ -90,11 +90,8 @@ void dns_zone_flush(DnsZone *z) {
assert(hashmap_size(z->by_key) == 0);
assert(hashmap_size(z->by_name) == 0);
- hashmap_free(z->by_key);
- z->by_key = NULL;
-
- hashmap_free(z->by_name);
- z->by_name = NULL;
+ z->by_key = hashmap_free(z->by_key);
+ z->by_name = hashmap_free(z->by_name);
}
static DnsZoneItem* dns_zone_get(DnsZone *z, DnsResourceRecord *rr) {
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
index 47f461a37d..b9fd8e3dbc 100644
--- a/src/resolve/resolved-link.c
+++ b/src/resolve/resolved-link.c
@@ -238,8 +238,7 @@ static int link_update_domains(Link *l) {
if (!l->unicast_scope)
return 0;
- strv_free(l->unicast_scope->domains);
- l->unicast_scope->domains = NULL;
+ l->unicast_scope->domains = strv_free(l->unicast_scope->domains);
r = sd_network_link_get_domains(l->ifindex,
&l->unicast_scope->domains);