]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: don't deref null c
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 12 Dec 2013 19:58:50 +0000 (13:58 -0600)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 12 Dec 2013 19:58:50 +0000 (13:58 -0600)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc_info.c

index 11555aa3e21834de1a1f312d707f7d03e327b515..b344dca50992d45544da75732a69f045cd45ee23 100644 (file)
@@ -275,7 +275,8 @@ static int print_info(const char *name, const char *lxcpath)
 
        c = lxc_container_new(name, lxcpath);
        if (!c) {
-               fprintf(stderr, "Failure to retrieve information on %s\n", c->name);
+               fprintf(stderr, "Failure to retrieve information on %s:%s\n", lxcpath ? lxcpath : "null",
+                               name ? name : "null");
                return -1;
        }