mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
bus: driverd: don't attempt to remove from empty list
This commit is contained in:
parent
3f78871b03
commit
215c7625dd
@ -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);
|
||||
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--;
|
||||
|
Loading…
Reference in New Issue
Block a user