]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Merge pull request #3087 from brauner/master
authorStéphane Graber <stgraber@ubuntu.com>
Wed, 10 Jul 2019 14:53:45 +0000 (10:53 -0400)
committerGitHub <noreply@github.com>
Wed, 10 Jul 2019 14:53:45 +0000 (10:53 -0400)
cgroup: check for non-empty conf

src/lxc/cgroups/cgroup.c

index bf92bf2985fb05c963c0c86e44737baceeff0b8d..5443bd96116950d4ab5ae5fda81b189e47bd9335 100644 (file)
@@ -44,6 +44,11 @@ struct cgroup_ops *cgroup_init(struct lxc_conf *conf)
 {
        struct cgroup_ops *cgroup_ops;
 
+       if (!conf) {
+               ERROR("No valid conf given");
+               return NULL;
+       }
+
        cgroup_ops = cgfsng_ops_init(conf);
        if (!cgroup_ops) {
                ERROR("Failed to initialize cgroup driver");