]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lxccontainer: lxc_container_free()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 24 Feb 2018 14:13:01 +0000 (15:13 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 24 Feb 2018 20:38:10 +0000 (21:38 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index b69a8229c2a0807303eed4229bf4f11ab5b93f3d..4858d971bec6c23010e9559469bb005a9ea0a222 100644 (file)
@@ -253,22 +253,28 @@ static void lxc_container_free(struct lxc_container *c)
 
        free(c->configfile);
        c->configfile = NULL;
+
        free(c->error_string);
        c->error_string = NULL;
+
        if (c->slock) {
                lxc_putlock(c->slock);
                c->slock = NULL;
        }
+
        if (c->privlock) {
                lxc_putlock(c->privlock);
                c->privlock = NULL;
        }
+
        free(c->name);
        c->name = NULL;
+
        if (c->lxc_conf) {
                lxc_conf_free(c->lxc_conf);
                c->lxc_conf = NULL;
        }
+
        free(c->config_path);
        c->config_path = NULL;