From: Susant Sahani Date: Sat, 1 Aug 2015 18:46:02 +0000 (+0530) Subject: networkd: fix neworkd crash X-Git-Tag: v225~128^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49f6e11e89b46bacf7b26f6da3921abc1c2faa80;p=thirdparty%2Fsystemd.git networkd: fix neworkd crash fix issue #827 hostname should be init to NULL. --- diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 4aa301b112a..5454bdd97bc 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -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);