chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
driverd: fix use-after-free error when maintaining match lists
[elogind.git]
/
src
/
bus-driverd
/
bus-driverd.c
diff --git
a/src/bus-driverd/bus-driverd.c
b/src/bus-driverd/bus-driverd.c
index 7e0ad1e0c05111235d12cf17b75fd74951e3873c..0f792038c4e0a147a03d07394731357d3ebd64d9 100644
(file)
--- 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)
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);
else
hashmap_remove(m->client->matches, m->match);