]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: fix neworkd crash 837/head
authorSusant Sahani <ssahani@gmail.com>
Sat, 1 Aug 2015 18:46:02 +0000 (00:16 +0530)
committerSusant Sahani <ssahani@gmail.com>
Sat, 1 Aug 2015 18:46:02 +0000 (00:16 +0530)
fix issue #827

hostname should be init to NULL.

src/network/networkd-dhcp4.c

index 4aa301b112a4afbda50b81f65ffd19d510e1ba18..5454bdd97bce1e5bee0f565d540e70c26b0977f5 100644 (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);