Commit 9beb9ce0 by Dwight Engen Committed by Serge Hallyn

coverity 1126129: don't try to print c->name when c is NULL

I accidentally introduced this with the change to lxc-info (commit b9d957c3). Signed-off-by: 's avatarDwight Engen <dwight.engen@oracle.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 4119204e
...@@ -255,10 +255,8 @@ static int print_info(const char *name, const char *lxcpath) ...@@ -255,10 +255,8 @@ static int print_info(const char *name, const char *lxcpath)
struct lxc_container *c; struct lxc_container *c;
c = lxc_container_new(name, lxcpath); c = lxc_container_new(name, lxcpath);
if (!c) { if (!c)
fprintf(stderr, "Insufficent privileges to control %s\n", c->name);
return -1; return -1;
}
if (!c->may_control(c)) { if (!c->may_control(c)) {
fprintf(stderr, "Insufficent privileges to control %s\n", c->name); fprintf(stderr, "Insufficent privileges to control %s\n", c->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment