mirror of
https://github.com/systemd/systemd.git
synced 2024-12-26 03:22:00 +03:00
core/manager: fix memory leak (#6400)
This fixes the memory leak introduced by 3536f49e8f
,
which forgot to free the prefixes in the manager.
Fixes #6398.
This commit is contained in:
parent
3536f49e8f
commit
35aba85a73
@ -1112,6 +1112,7 @@ static void manager_clear_jobs_and_units(Manager *m) {
|
||||
Manager* manager_free(Manager *m) {
|
||||
UnitType c;
|
||||
int i;
|
||||
ExecDirectoryType dt;
|
||||
|
||||
if (!m)
|
||||
return NULL;
|
||||
@ -1184,6 +1185,9 @@ Manager* manager_free(Manager *m) {
|
||||
hashmap_free(m->uid_refs);
|
||||
hashmap_free(m->gid_refs);
|
||||
|
||||
for (dt = 0; dt < _EXEC_DIRECTORY_MAX; dt++)
|
||||
m->prefix[dt] = mfree(m->prefix[dt]);
|
||||
|
||||
return mfree(m);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user