Merge branch 'jk/hash-object-literally-fd-leak'

Leakfix.

* jk/hash-object-literally-fd-leak:
  hash-object: fix descriptor leak with --literally
This commit is contained in:
Junio C Hamano
2023-01-27 08:51:41 -08:00

View File

@ -27,6 +27,7 @@ static int hash_literally(struct object_id *oid, int fd, const char *type, unsig
else
ret = write_object_file_literally(buf.buf, buf.len, type, oid,
flags);
close(fd);
strbuf_release(&buf);
return ret;
}