conf: cleanup macros remount_all_slave

parent 48411df2
...@@ -3283,11 +3283,11 @@ void tmp_proc_unmount(struct lxc_conf *lxc_conf) ...@@ -3283,11 +3283,11 @@ void tmp_proc_unmount(struct lxc_conf *lxc_conf)
/* Walk /proc/mounts and change any shared entries to slave. */ /* Walk /proc/mounts and change any shared entries to slave. */
void remount_all_slave(void) void remount_all_slave(void)
{ {
__do_free char *line = NULL;
int memfd, mntinfo_fd, ret; int memfd, mntinfo_fd, ret;
ssize_t copied; ssize_t copied;
FILE *f; FILE *f;
size_t len = 0; size_t len = 0;
char *line = NULL;
mntinfo_fd = open("/proc/self/mountinfo", O_RDONLY | O_CLOEXEC); mntinfo_fd = open("/proc/self/mountinfo", O_RDONLY | O_CLOEXEC);
if (mntinfo_fd < 0) { if (mntinfo_fd < 0) {
...@@ -3369,7 +3369,6 @@ again: ...@@ -3369,7 +3369,6 @@ again:
TRACE("Remounted \"%s\" as MS_SLAVE", target); TRACE("Remounted \"%s\" as MS_SLAVE", target);
} }
fclose(f); fclose(f);
free(line);
TRACE("Remounted all mount table entries as MS_SLAVE"); TRACE("Remounted all mount table entries as MS_SLAVE");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment