From: Lennart Poettering Date: Wed, 8 Jan 2014 15:06:48 +0000 (+0800) Subject: driverd: fix use-after-free error when maintaining match lists X-Git-Tag: submit/kdbus-integration/20140207.094352~155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f37925e02f562d0f705be29ec31b0053ce6f7afa;p=platform%2Fupstream%2Fsystemd.git driverd: fix use-after-free error when maintaining match lists --- diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c index 7e0ad1e..0f79203 100644 --- a/src/bus-driverd/bus-driverd.c +++ b/src/bus-driverd/bus-driverd.c @@ -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);