[systemd-commits] src/shared

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sat Nov 30 20:05:19 PST 2013


 src/shared/fileio.c |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit d78a28e3d7c8736d9addc2e45762d0f511ebbcdb
Author: Shawn Landden <shawn at churchofgit.com>
Date:   Sat Nov 30 20:02:27 2013 -0800

    fix regression of read_full_file() in fileio.c
    
    my e93c33d4aa broke this stupidly

diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index ac1b409..ede8819 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c
@@ -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;



More information about the systemd-commits mailing list