diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/receive-pack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 9ed8fbbfad..f2c6953a39 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1667,8 +1667,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); /* |