]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups/cgfsng: make sure pointer is NULL
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 31 Oct 2017 10:55:23 +0000 (11:55 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 6 Nov 2017 23:54:27 +0000 (00:54 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 561e873faed94ce0357e28f8c289e9edac94c6c2..ebfbae2dea5a55b38bc35ec5ff5c577e437c082f 100644 (file)
@@ -1187,6 +1187,8 @@ static void *cgfsng_init(struct lxc_handler *handler)
        d->name = must_copy_string(handler->name);
 
        /* copy per-container cgroup information */
+       d->cgroup_meta.dir = NULL;
+       d->cgroup_meta.controllers = NULL;
        if (handler->conf) {
                d->cgroup_meta.dir = must_copy_string(handler->conf->cgroup_meta.dir);
                d->cgroup_meta.controllers = must_copy_string(handler->conf->cgroup_meta.controllers);