diff options
author | Susant Sahani <ssahani@gmail.com> | 2015-08-02 00:16:02 +0530 |
---|---|---|
committer | Susant Sahani <ssahani@gmail.com> | 2015-08-02 00:16:02 +0530 |
commit | 49f6e11e89b46bacf7b26f6da3921abc1c2faa80 (patch) | |
tree | 31665885781056ee11957f339288c74d88cf1e29 | |
parent | 5f17089ac1e86c25806d3f066243561360efd2ca (diff) |
networkd: fix neworkd crash
fix issue #827
hostname should be init to NULL.
-rw-r--r-- | src/network/networkd-dhcp4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 4aa301b112..5454bdd97b 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); |