From 7969675f2a78cf0e0f737f9c813c9ce79aa5882e Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 19 Feb 2019 23:47:05 +0100 Subject: [PATCH] conf: cleanup macros remount_all_slave Signed-off-by: Christian Brauner --- src/lxc/conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index f7ad1ba2f..79ae7f157 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3283,11 +3283,11 @@ void tmp_proc_unmount(struct lxc_conf *lxc_conf) /* Walk /proc/mounts and change any shared entries to slave. */ void remount_all_slave(void) { + __do_free char *line = NULL; int memfd, mntinfo_fd, ret; ssize_t copied; FILE *f; size_t len = 0; - char *line = NULL; mntinfo_fd = open("/proc/self/mountinfo", O_RDONLY | O_CLOEXEC); if (mntinfo_fd < 0) { @@ -3369,7 +3369,6 @@ again: TRACE("Remounted \"%s\" as MS_SLAVE", target); } fclose(f); - free(line); TRACE("Remounted all mount table entries as MS_SLAVE"); } -- 2.47.3