From: Christian Brauner Date: Fri, 22 Feb 2019 21:07:26 +0000 (+0100) Subject: conf: cleanup macros setup_mount_entries X-Git-Tag: lxc-3.2.0~131^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c85ced6517047d0a921afe4cc8ca1f24f3752525;p=thirdparty%2Flxc.git conf: cleanup macros setup_mount_entries Signed-off-by: Christian Brauner --- 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)