From c85ced6517047d0a921afe4cc8ca1f24f3752525 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Fri, 22 Feb 2019 22:07:26 +0100 Subject: [PATCH] conf: cleanup macros setup_mount_entries Signed-off-by: Christian Brauner --- src/lxc/conf.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 088fc003c..1e5bcb2f7 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2413,17 +2413,13 @@ static int setup_mount_entries(const struct lxc_conf *conf, struct lxc_list *mount, const char *lxc_name, const char *lxc_path) { - int ret; - FILE *f; + __do_fclose FILE *f = NULL; f = make_anonymous_mount_file(mount, conf->lsm_aa_allow_nesting); if (!f) return -1; - ret = mount_file_entries(conf, rootfs, f, lxc_name, lxc_path); - fclose(f); - - return ret; + return mount_file_entries(conf, rootfs, f, lxc_name, lxc_path); } static int parse_cap(const char *cap) -- 2.47.2