chiark / gitweb /
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[elogind.git] / src / basic / socket-util.c
index 23a5337003c5a616fa929014db2e80c8e15c383d..dcfa0e0d86ebe45c44a26102c241299e3e0e362c 100644 (file)
@@ -1043,8 +1043,7 @@ int getpeergroups(int fd, gid_t **ret) {
         if ((socklen_t) (int) n != n)
                 return -E2BIG;
 
-        *ret = d;
-        d = NULL;
+        *ret = TAKE_PTR(d);
 
         return (int) n;
 }