diff options
author | Dimitri Staessens <[email protected]> | 2020-03-18 21:53:21 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2020-03-20 12:10:44 +0100 |
commit | 5a4bd2f65b38a891237b3d73255eff3493082788 (patch) | |
tree | 907c1dce708527f37010b1154fd43ea19eed0acd /src/irmd/main.c | |
parent | f5b97219d7e44569612a17e7b257f97b8f723d72 (diff) | |
download | ouroboros-0.17.1.tar.gz ouroboros-0.17.1.zip |
irmd: Fix cleanup of shm_flow_set0.17.1
The shm_flowset destroy was using the irmd pid, resulting in wrong
unlinks. The irmd was not cleaning up the process table, resulting in
shm leaks if there were still running processes on exit.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r-- | src/irmd/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index 940432f1..1c928dca 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -1780,6 +1780,13 @@ static void irm_fini(void) prog_entry_destroy(e); } + list_for_each_safe(p, h, &irmd.proc_table) { + struct proc_entry * e = list_entry(p, struct proc_entry, next); + list_del(&e->next); + e->state = PROC_INIT; /* sanitizer already joined */ + proc_entry_destroy(e); + } + registry_destroy(&irmd.registry); pthread_rwlock_unlock(&irmd.reg_lock); |