]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd-network/sd-ndisc.c
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[thirdparty/systemd.git] / src / libsystemd-network / sd-ndisc.c
index b5c6d6e84d47994e9d3f54750d6078f3662d61d2..c17df429c19edac6303a5d493c9de7e2e65e34b3 100644 (file)
@@ -166,8 +166,7 @@ _public_ int sd_ndisc_new(sd_ndisc **ret) {
         nd->n_ref = 1;
         nd->fd = -1;
 
-        *ret = nd;
-        nd = NULL;
+        *ret = TAKE_PTR(nd);
 
         return 0;
 }