diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-08-05 21:01:06 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-08-05 21:02:41 -0400 |
commit | 73974f6768ef5314a572eb93f5cfc7f0f29c9549 (patch) | |
tree | e95c0a5626290c79e7c31ac143e6c75a0f167d9d /src/libsystemd-network/sd-dhcp-lease.c | |
parent | 4306d66f594722a2fe44b034d3c68bfb864c6a76 (diff) | |
parent | 90365b043ab6a0d8100e0c37dea4ca9d6fdb4695 (diff) |
Merge branch 'hostnamectl-dot-v2'
Manual merge of https://github.com/systemd/systemd/pull/751.
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-lease.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-lease.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c index f196a3f3dd..eae186c9d3 100644 --- a/src/libsystemd-network/sd-dhcp-lease.c +++ b/src/libsystemd-network/sd-dhcp-lease.c @@ -561,11 +561,10 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const uint8_t *option, if (e) *e = 0; - if (!hostname_is_valid(hostname) || is_localhost(hostname)) + if (!hostname_is_valid(hostname, false) || is_localhost(hostname)) break; - free(lease->hostname); - lease->hostname = hostname; + free_and_replace(&lease->hostname, hostname); hostname = NULL; break; |