From 22f835ba4d4f9a5943217aaee77bf3995902a28d Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 19 Feb 2019 23:47:26 +0100 Subject: [PATCH] conf: cleanup macros lxc_execute_bind_init Signed-off-by: Christian Brauner --- src/lxc/conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.47.2