Commit cace924
committed
broker: fix use-after-free segfault
Problem: on Ubuntu 22.04, t0014-runlevel.t triggers a segfault
when it runs the broker with broker.rc3_path=/bin/false.
If a module has not been fully unloaded by the time modhash_destroy()
is called, the module's context could be destroyed before its service
entry is removed. Then a disconnect message sent when another module
context is destroyed may cause the destroyed module context to be
dereferenced.
Add code to ensure the service hash is removed when the module is
destroyed, if that hasn't happened already.
Fixes #4564.1 parent 5380875 commit cace924
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
382 | 391 | | |
383 | 392 | | |
384 | 393 | | |
| |||
0 commit comments