chiark / gitweb /
fix regression of read_full_file() in fileio.c
authorShawn Landden <shawn@churchofgit.com>
Sun, 1 Dec 2013 04:02:27 +0000 (20:02 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 1 Dec 2013 04:04:17 +0000 (23:04 -0500)
my e93c33d4aa broke this stupidly

src/shared/fileio.c

index ac1b409..ede8819 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;