diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-01-27 08:51:41 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-01-27 08:51:41 -0800 |
| commit | 630ae5ee65a4e3ed769af04acfcb1fd9b22b3675 (patch) | |
| tree | 369f7a6eed514f9dfc5c76e081ea81f68d23569a /builtin/hash-object.c | |
| parent | Merge branch 'pb/branch-advice-recurse-submodules' (diff) | |
| parent | hash-object: fix descriptor leak with --literally (diff) | |
| download | git-630ae5ee65a4e3ed769af04acfcb1fd9b22b3675.tar.gz git-630ae5ee65a4e3ed769af04acfcb1fd9b22b3675.zip | |
Merge branch 'jk/hash-object-literally-fd-leak'
Leakfix.
* jk/hash-object-literally-fd-leak:
hash-object: fix descriptor leak with --literally
Diffstat (limited to 'builtin/hash-object.c')
| -rw-r--r-- | builtin/hash-object.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/hash-object.c b/builtin/hash-object.c index b506381502..44db83f07f 100644 --- a/builtin/hash-object.c +++ b/builtin/hash-object.c @@ -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; } |
