networkd: fix neworkd crash

fix issue #827

hostname should be init to NULL.
This commit is contained in:
Susant Sahani
2015-08-02 00:16:02 +05:30
parent 5f17089ac1
commit 49f6e11e89
+1 -1
View File
@@ -468,7 +468,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
}
if (link->network->dhcp_hostname) {
const char *hostname;
const char *hostname = NULL;
if (!link->network->hostname)
r = sd_dhcp_lease_get_hostname(lease, &hostname);