]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/timedate/timedated.c
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[thirdparty/systemd.git] / src / timedate / timedated.c
index 822835cce99e38b0cc935cbd343ec3ef5d5c371f..34ea03892c1580c76ee41cebdecc0fbb1bf05edb 100644 (file)
@@ -683,8 +683,7 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
         if (r < 0)
                 return log_error_errno(r, "Failed to attach bus to event loop: %m");
 
-        *_bus = bus;
-        bus = NULL;
+        *_bus = TAKE_PTR(bus);
 
         return 0;
 }