summaryrefslogtreecommitdiff
path: root/src/bus-driverd
diff options
context:
space:
mode:
Diffstat (limited to 'src/bus-driverd')
-rw-r--r--src/bus-driverd/bus-driverd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c
index f8a123d4f1..44172c4ed6 100644
--- a/src/bus-driverd/bus-driverd.c
+++ b/src/bus-driverd/bus-driverd.c
@@ -90,10 +90,10 @@ static void match_free(Match *m) {
Match *first;
first = hashmap_get(m->client->matches, m->match);
- if (first) {
- LIST_REMOVE(matches, first, m);
+ LIST_REMOVE(matches, first, m);
+ if (first)
assert_se(hashmap_replace(m->client->matches, m->match, first) >= 0);
- } else
+ else
hashmap_remove(m->client->matches, m->match);
m->client->n_matches--;