chiark / gitweb /
conf-parser: warn when we open configuration files with weird access bits
[elogind.git] / src / shared / fileio.c
index ac1b409a1c7efa1c4aaf274055922a0d7508cd88..ede88196b5f1a9374a5b387a9d72278bf86255cb 100644 (file)
@@ -240,6 +240,7 @@ int read_full_file(const char *fn, char **contents, size_t *size) {
 
         buf[l] = 0;
         *contents = buf;
+        buf = NULL; /* do not free */
 
         if (size)
                 *size = l;