rlimit-util: add a common destructor call for arrays of struct rlimit

This commit is contained in:
Lennart Poettering
2018-05-17 20:36:52 +02:00
parent 4f424df760
commit 31ce987c2b
4 changed files with 15 additions and 5 deletions
+1 -2
View File
@@ -3574,8 +3574,7 @@ void exec_context_done(ExecContext *c) {
c->pass_environment = strv_free(c->pass_environment);
c->unset_environment = strv_free(c->unset_environment);
for (l = 0; l < ELEMENTSOF(c->rlimit); l++)
c->rlimit[l] = mfree(c->rlimit[l]);
rlimit_free_all(c->rlimit);
for (l = 0; l < 3; l++) {
c->stdio_fdname[l] = mfree(c->stdio_fdname[l]);