diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-01-27 16:51:41 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-27 16:51:41 (GMT) |
commit | 630ae5ee65a4e3ed769af04acfcb1fd9b22b3675 (patch) | |
tree | 369f7a6eed514f9dfc5c76e081ea81f68d23569a | |
parent | 7d4d34f843f757c79835501438ae502576861e01 (diff) | |
parent | 590b63673747597ab458cb4414e68bb7c4a66aea (diff) | |
download | git-630ae5ee65a4e3ed769af04acfcb1fd9b22b3675.zip git-630ae5ee65a4e3ed769af04acfcb1fd9b22b3675.tar.gz git-630ae5ee65a4e3ed769af04acfcb1fd9b22b3675.tar.bz2 |
Merge branch 'jk/hash-object-literally-fd-leak'
Leakfix.
* jk/hash-object-literally-fd-leak:
hash-object: fix descriptor leak with --literally
-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 b506381..44db83f 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; } |