1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

bus: driverd: don't attempt to remove from empty list

This commit is contained in:
Marc-Antoine Perennou 2013-12-28 13:54:18 +09:00 committed by Kay Sievers
parent 3f78871b03
commit 215c7625dd

View File

@ -90,10 +90,10 @@ static void match_free(Match *m) {
Match *first;
first = hashmap_get(m->client->matches, m->match);
LIST_REMOVE(matches, first, m);
if (first)
if (first) {
LIST_REMOVE(matches, first, m);
assert_se(hashmap_replace(m->client->matches, m->match, first) >= 0);
else
} else
hashmap_remove(m->client->matches, m->match);
m->client->n_matches--;