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 | 7d4d34f843f757c79835501438ae502576861e01 (diff) | |
| parent | 590b63673747597ab458cb4414e68bb7c4a66aea (diff) | |
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; } |
