diff options
author | Marc-Antoine Perennou <Marc-Antoine@Perennou.com> | 2013-12-28 13:54:18 +0900 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2014-01-05 11:36:04 +0400 |
commit | 215c7625dd510759290d45d6c46434e4338843ec (patch) | |
tree | 9976b04e08674999b00778d228f329a7fd212af7 /src/bus-driverd/bus-driverd.c | |
parent | 3f78871b03723e3a5334a9529d92264f2be52d87 (diff) |
bus: driverd: don't attempt to remove from empty list
Diffstat (limited to 'src/bus-driverd/bus-driverd.c')
-rw-r--r-- | src/bus-driverd/bus-driverd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c index 44172c4ed6..f8a123d4f1 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); - 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--; |