]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/nspawn/nspawn-expose-ports.c
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[thirdparty/systemd.git] / src / nspawn / nspawn-expose-ports.c
index 98eb85081ee4c32fcf09f08cd3c8580840a80472..0e2da276e70899ccb06af807a055cc8bcdd1e589 100644 (file)
@@ -239,8 +239,7 @@ int expose_port_watch_rtnl(
         if (r < 0)
                 return log_error_errno(r, "Failed to add to even loop: %m");
 
-        *ret = rtnl;
-        rtnl = NULL;
+        *ret = TAKE_PTR(rtnl);
 
         return 0;
 }