Skip to content

Commit

Permalink
conf: cleanup macros lxc_execute_bind_init
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Apr 10, 2019
1 parent 1d9cba1 commit 6599309
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lxc/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3329,10 +3329,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;

Expand Down

0 comments on commit 6599309

Please sign in to comment.