summaryrefslogtreecommitdiff
path: root/src/network/test-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/test-network.c')
-rw-r--r--src/network/test-network.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/network/test-network.c b/src/network/test-network.c
index 46afeec926..9c372c7798 100644
--- a/src/network/test-network.c
+++ b/src/network/test-network.c
@@ -21,12 +21,9 @@
#include "networkd.h"
-static void test_link(struct udev_device *loopback) {
- _cleanup_manager_free_ Manager *manager = NULL;
+static void test_link(Manager *manager, struct udev_device *loopback) {
Link *link = NULL;
- manager_new(&manager);
-
assert_se(link_new(manager, loopback, &link) >= 0);
assert_se(link);
}
@@ -69,7 +66,7 @@ int main(void) {
test_network_get(manager, loopback);
- test_link(loopback);
+ test_link(manager, loopback);
assert_se(manager_udev_listen(manager) >= 0);
assert_se(manager_udev_enumerate_links(manager) >= 0);