projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76fc157
)
home: fix heap-use-after-free
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 14 Dec 2021 06:38:12 +0000
(15:38 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 14 Dec 2021 11:00:56 +0000
(20:00 +0900)
`bus_home_emit_remove()` may be called from manager_free() -> home_free().
In that case, manager->bus is already unref()ed.
Fixes #21767.
src/home/homed-home-bus.c
patch
|
blob
|
history
diff --git
a/src/home/homed-home-bus.c
b/src/home/homed-home-bus.c
index 9e9f537d6c883499faddfe457988992a3dfbe1c6..61d4690780944d565703bd96095064b48545ff48 100644
(file)
--- a/
src/home/homed-home-bus.c
+++ b/
src/home/homed-home-bus.c
@@
-940,6
+940,12
@@
int bus_home_emit_remove(Home *h) {
if (!h->announced)
return 0;
+ if (!h->manager)
+ return 0;
+
+ if (!h->manager->bus)
+ return 0;
+
r = bus_home_path(h, &path);
if (r < 0)
return r;