]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkctl: list drop unused dbus connection
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 10 Oct 2025 08:32:28 +0000 (10:32 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 13 Oct 2025 08:04:47 +0000 (10:04 +0200)
Do not acquire dbus connection as it is unused in list_links

(cherry picked from commit 505deaff019dadfb9121cd3e265d6b3f7524f5fd)
(cherry picked from commit 708fb198c4050e51d1d4eabab8599c3bacc8c479)

src/network/networkctl-list.c

index a23930d80e4ba53a3a5b4f8a6b985196ddaa4ea7..b782eea4e9fb010511107d8e10ee9a32c5b14901 100644 (file)
@@ -11,7 +11,6 @@
 #include "networkctl-util.h"
 
 int list_links(int argc, char *argv[], void *userdata) {
-        _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
         _cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL;
         _cleanup_(link_info_array_freep) LinkInfo *links = NULL;
         _cleanup_(table_unrefp) Table *table = NULL;
@@ -22,10 +21,6 @@ int list_links(int argc, char *argv[], void *userdata) {
         if (r != 0)
                 return r;
 
-        r = acquire_bus(&bus);
-        if (r < 0)
-                return r;
-
         r = sd_netlink_open(&rtnl);
         if (r < 0)
                 return log_error_errno(r, "Failed to connect to netlink: %m");