Commit f5254d78 by Sven Strickroth

Fix possible double close

Signed-off-by: Sven Strickroth <email@cs-ware.de>
parent d477a9ab
......@@ -222,6 +222,7 @@ int git_futils_writebuffer(
if ((error = p_write(fd, git_buf_cstr(buf), git_buf_len(buf))) < 0) {
giterr_set(GITERR_OS, "Could not write to '%s'", path);
(void)p_close(fd);
return error;
}
if ((error = p_close(fd)) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment