summaryrefslogtreecommitdiff
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-07-01 10:09:52 +0200
committerTom Gundersen <teg@jklm.no>2014-07-01 10:21:18 +0200
commit5da8149fd33f07aabdac72880143ec13e516f933 (patch)
treebc42f86bd621058978ade64e312ebf83e48fbf3d /src/network/networkd-manager.c
parent3a53fdaa34eded70d6f971234a9ac78891336f9e (diff)
networkd: link - improve refcounting
We failed to take a ref when waiting for udev synchronization. Fix that and also make unreffing in callbacks simpler throughout by using _cleanup_ macros. Fixes <https://bugs.freedesktop.org/show_bug.cgi?id=80556>.
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 5cc88723e5..c93d598c6b 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -410,6 +410,8 @@ int manager_udev_listen(Manager *m) {
int manager_rtnl_listen(Manager *m) {
int r;
+ assert(m);
+
r = sd_rtnl_attach_event(m->rtnl, m->event, 0);
if (r < 0)
return r;