]> 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 4bf558b12bae56896d21ed0918d7fcf070ef857c..c17df429c19edac6303a5d493c9de7e2e65e34b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -165,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;
 }