From: Christian Brauner Date: Tue, 19 Feb 2019 22:47:05 +0000 (+0100) Subject: conf: cleanup macros remount_all_slave X-Git-Tag: lxc-3.2.0~132^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7969675f2a78cf0e0f737f9c813c9ce79aa5882e;p=thirdparty%2Flxc.git conf: cleanup macros remount_all_slave Signed-off-by: Christian Brauner --- 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"); }