summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-11-21 21:04:04 +0100
committerTom Gundersen <teg@jklm.no>2013-11-21 21:04:04 +0100
commit5a3eb5a77d7c491a31818c4dfdcf8fd7dcaaadb2 (patch)
treecc860127113bc99e7907998995e7765ee7418726 /src/network/networkd-network.c
parent602cc437e8b4a3ab760b5a23fa4f3112134d9c36 (diff)
networkd: make sure Network and Link can always be freed
Also, don't fail a link just because we can't find its MAC address.
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r--src/network/networkd-network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index d4239ab8d0..7be9645d59 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -42,6 +42,8 @@ static int network_load_one(Manager *manager, const char *filename) {
if (!network)
return log_oom();
+ network->manager = manager;
+
LIST_HEAD_INIT(network->addresses);
r = config_parse(NULL, filename, file, "Match\0Network\0", config_item_perf_lookup,
@@ -56,8 +58,6 @@ static int network_load_one(Manager *manager, const char *filename) {
if (!network->filename)
return log_oom();
- network->manager = manager;
-
LIST_PREPEND(networks, manager->networks, network);
network = NULL;