]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/khash.c
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[thirdparty/systemd.git] / src / basic / khash.c
index 6463faf3e12ac72a5b9e3edb59765b2fdb1a2fce..b3e1dc444840d05691022f7cb00b3d5fabe851eb 100644 (file)
@@ -216,8 +216,7 @@ int khash_dup(khash *h, khash **ret) {
         if (copy->fd < 0)
                 return -errno;
 
-        *ret = copy;
-        copy = NULL;
+        *ret = TAKE_PTR(copy);
 
         return 0;
 }