Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'rs/path-name-safety-cleanup' into maint
[gitweb.git]
/
builtin
/
receive-pack.c
diff --git
a/builtin/receive-pack.c
b/builtin/receive-pack.c
index 1dbb8a069225be1e9d9fe27ad4b83a8bd66ca511..8672825e2e57fc0d17dcc65bbf482fb1d476684f 100644
(file)
--- a/
builtin/receive-pack.c
+++ b/
builtin/receive-pack.c
@@
-1664,8
+1664,11
@@
static const char *unpack(int err_fd, struct shallow_info *si)
}
tmp_objdir = tmp_objdir_create();
- if (!tmp_objdir)
+ if (!tmp_objdir) {
+ if (err_fd > 0)
+ close(err_fd);
return "unable to create temporary object directory";
+ }
child.env = tmp_objdir_env(tmp_objdir);
/*