From: Christian Brauner Date: Tue, 19 Feb 2019 22:47:26 +0000 (+0100) Subject: conf: cleanup macros lxc_execute_bind_init X-Git-Tag: lxc-3.2.0~132^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22f835ba4d4f9a5943217aaee77bf3995902a28d;p=thirdparty%2Flxc.git conf: cleanup macros lxc_execute_bind_init Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 79ae7f157..d2220ce71 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3382,10 +3382,9 @@ static int lxc_execute_bind_init(struct lxc_handler *handler) /* If init exists in the container, don't bind mount a static one */ p = choose_init(conf->rootfs.mount); if (p) { - char *old = p; + __do_free char *old = p; p = strdup(old + strlen(conf->rootfs.mount)); - free(old); if (!p) return -ENOMEM;