1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-10 16:58:28 +03:00

core: properly cleanup ExecParameter's prefix array

This commit is contained in:
Frantisek Sumsal 2023-10-19 16:47:46 +02:00
parent 4701425dd5
commit d31330c1fa

View File

@ -2255,7 +2255,13 @@ void exec_params_serialized_done(ExecParameters *p) {
p->cgroup_path = mfree(p->cgroup_path);
p->prefix = strv_free(p->prefix);
if (p->prefix) {
for (ExecDirectoryType t = 0; t < _EXEC_DIRECTORY_TYPE_MAX; t++)
free(p->prefix[t]);
p->prefix = mfree(p->prefix);
}
p->received_credentials_directory = mfree(p->received_credentials_directory);
p->received_encrypted_credentials_directory = mfree(p->received_encrypted_credentials_directory);