]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/unpack-file.c
unpack-file: fix ancient leak in create_temp_file()
[thirdparty/git.git] / builtin / unpack-file.c
index 9e8119dd35422a93c63dbe23f840bda5ec69c5e5..88de32b7d7e66e3d7e1c57775b5f0a1b0b045175 100644 (file)
@@ -19,6 +19,7 @@ static char *create_temp_file(struct object_id *oid)
        if (write_in_full(fd, buf, size) < 0)
                die_errno("unable to write temp-file");
        close(fd);
+       free(buf);
        return path;
 }