Unverified Commit 71162625 by Christian Brauner Committed by Stéphane Graber

confile: config_utsname()

parent 21304bdd
......@@ -2045,8 +2045,10 @@ static int config_utsname(const char *key, const char *value,
{
struct utsname *utsname;
if (config_value_empty(value))
if (config_value_empty(value)) {
lxc_clear_config_item(lxc_conf, key);
return 0;
}
utsname = malloc(sizeof(*utsname));
if (!utsname) {
......@@ -2055,8 +2057,7 @@ static int config_utsname(const char *key, const char *value,
}
if (strlen(value) >= sizeof(utsname->nodename)) {
ERROR("node name '%s' is too long",
value);
ERROR("node name '%s' is too long", value);
free(utsname);
return -1;
}
......
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