]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/fileio.c
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[thirdparty/systemd.git] / src / basic / fileio.c
index f807842c311b48f72e3476f2527ecd3002845080..d0cb033bbb307372bc0fe6aa70768b79619fedf4 100644 (file)
@@ -1606,8 +1606,7 @@ int read_line(FILE *f, size_t limit, char **ret) {
         if (ret) {
                 buffer[n] = 0;
 
-                *ret = buffer;
-                buffer = NULL;
+                *ret = TAKE_PTR(buffer);
         }
 
         return (int) count;