summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-network.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-09-27 10:48:11 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-09-27 10:48:34 +0200
commit727ba17f551cff98356c304cbacd83792783c2e7 (patch)
tree7eae6d8d2bb49d39f6bf68d018fa71a278317194 /src/network/networkd-network.c
parentnetwork: fix alignment (diff)
downloadsystemd-727ba17f551cff98356c304cbacd83792783c2e7.tar.xz
systemd-727ba17f551cff98356c304cbacd83792783c2e7.zip
network: fix memleak around Network.dhcp_vendor_class_identifier
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r--src/network/networkd-network.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 107762d519..8d7795d72c 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -80,8 +80,7 @@ void network_apply_anonymize_if_set(Network *network) {
network->dhcp_client_identifier = DHCP_CLIENT_ID_MAC;
/* RFC 7844 3.10:
SHOULD NOT use the Vendor Class Identifier option */
- /* NOTE: it was not initiallized to any value in network_load_one. */
- network->dhcp_vendor_class_identifier = false;
+ network->dhcp_vendor_class_identifier = mfree(network->dhcp_vendor_class_identifier);
/* RFC7844 section 3.6.:
The client intending to protect its privacy SHOULD only request a
minimal number of options in the PRL and SHOULD also randomly shuffle
@@ -201,10 +200,6 @@ static int network_load_one(Manager *manager, const char *filename) {
network->dhcp_client_identifier = DHCP_CLIENT_ID_DUID;
network->dhcp_route_table = RT_TABLE_MAIN;
network->dhcp_route_table_set = false;
- /* NOTE: the following vars were not set to any default,
- * even if they are commented in the man?
- * These vars might be overwriten by network_apply_anonymize_if_set */
- network->dhcp_vendor_class_identifier = false;
/* NOTE: from man: UseMTU=... Defaults to false*/
network->dhcp_use_mtu = false;
/* NOTE: from man: UseTimezone=... Defaults to "no".*/