Code

user-manual: update for new default --track behavior
[git.git] / builtin-stripspace.c
index 0c970aa945a5ae615a2a7af2b2c0c75fb14f0b8e..55716873dc4f4a8baa5f2b37d6dca1de488b38e4 100644 (file)
@@ -79,8 +79,10 @@ int cmd_stripspace(int argc, const char **argv, const char *prefix)
 
        size = 1024;
        buffer = xmalloc(size);
-       if (read_pipe(0, &buffer, &size))
+       if (read_fd(0, &buffer, &size)) {
+               free(buffer);
                die("could not read the input");
+       }
 
        size = stripspace(buffer, size, 0);
        write_or_die(1, buffer, size);