coverity: #1425928

Avoid NULL-pointer dereference. Apparently monitor.{c,h} calls lxc_check_inherited() with NULL passed for the config. This isn't really a big issue since monitor.{c,h} is effectively dead for all liblxc versions that have the state client patch. Also, the patch that introduces the relevant lines into lxc_check_inherited() is only in master and yet unreleased. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent e1e76423
...@@ -226,14 +226,16 @@ restart: ...@@ -226,14 +226,16 @@ restart:
continue; continue;
/* Keep state clients that wait on reboots. */ /* Keep state clients that wait on reboots. */
lxc_list_for_each(cur, &conf->state_clients) { if (conf) {
struct lxc_state_client *client = cur->elem; lxc_list_for_each(cur, &conf->state_clients) {
struct lxc_state_client *client = cur->elem;
if (client->clientfd != fd) if (client->clientfd != fd)
continue; continue;
matched = true; matched = true;
break; break;
}
} }
if (matched) if (matched)
......
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