Skip to content

Commit 630ae5e

Browse files
committed
Merge branch 'jk/hash-object-literally-fd-leak'
Leakfix. * jk/hash-object-literally-fd-leak: hash-object: fix descriptor leak with --literally
2 parents 7d4d34f + 590b636 commit 630ae5e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/hash-object.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ static int hash_literally(struct object_id *oid, int fd, const char *type, unsig
2727
else
2828
ret = write_object_file_literally(buf.buf, buf.len, type, oid,
2929
flags);
30+
close(fd);
3031
strbuf_release(&buf);
3132
return ret;
3233
}

0 commit comments

Comments
 (0)