1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-27 07:22:31 +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:
Yu Watanabe 2017-07-18 23:30:52 +09:00 committed by Evgeny Vereshchagin
parent 3536f49e8f
commit 35aba85a73

View File

@ -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);
}