-From f9c640fa1d4c14dfbd2bc40af91cb446ad373075 Mon Sep 17 00:00:00 2001
+From 12d92162c449d51f4ffa482f7daaeb42c4135937 Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Tue, 2 Jul 2019 20:51:08 +0000
 Subject: [PATCH] Add additional cgroup mounts from root NS automatically

+		free(dpath);
+	}
+	closedir(dir);
 	/* Mount tmpfs at new cgroup directory */
 	if (mount("tmpfs", cgroup_path, "tmpfs", MS_NODEV|MS_NOSUID, options) == -1) {
 		pr_perror("%s: Failed to mount tmpfs at %s", id, cgroup_path);
-- 
2.19.1


 1 file changed, 45 insertions(+)

diff --git a/src/systemdhook.c b/src/systemdhook.c
index c2cb2b9..f9ec9f2 100644
--- a/src/systemdhook.c
+++ b/src/systemdhook.c
@@ -274,6 +274,11 @@ static char *get_process_cgroup_subsystem_path(const char *id, int pid, const ch
 static int mount_cgroup(const char *id, const char *rootfs, const char *options, char *systemd_path)
 {
 	_cleanup_free_ char *cgroup_path = NULL;
