Commit 6f2aa8a8 authored by Dan Williams's avatar Dan Williams

ifupdown: return NULL hostname, not a zero-length string

parent 9e2ec0b7
......@@ -565,6 +565,12 @@ update_system_hostname(NMInotifyHelper *inotify_helper,
priv->hostname = g_strstrip(hostname_file);
/* We shouldn't return a zero-length hostname, but NULL */
if (priv->hostname && !strlen (priv->hostname)) {
g_free (priv->hostname);
priv->hostname = NULL;
}
g_object_notify (G_OBJECT (config), NM_SYSTEM_CONFIG_INTERFACE_HOSTNAME);
}
......
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