chiark / gitweb /
driverd: fix use-after-free error when maintaining match lists
authorLennart Poettering <lennart@poettering.net>
Wed, 8 Jan 2014 15:06:48 +0000 (23:06 +0800)
committerLennart Poettering <lennart@poettering.net>
Wed, 8 Jan 2014 15:08:35 +0000 (23:08 +0800)
src/bus-driverd/bus-driverd.c

index 7e0ad1e..0f79203 100644 (file)
@@ -93,7 +93,7 @@ static void match_free(Match *m) {
                 first = hashmap_get(m->client->matches, m->match);
                 LIST_REMOVE(matches, first, m);
                 if (first)
-                        assert_se(hashmap_replace(m->client->matches, m->match, first) >= 0);
+                        assert_se(hashmap_replace(m->client->matches, first->match, first) >= 0);
                 else
                         hashmap_remove(m->client->matches, m->match);