Commit ae4cae4e by Russell Belfer

Merge pull request #607 from nulltoken/fix/file-close-on-error

test helpers: Fix file close on error
parents a227451d e285bdc9
......@@ -197,7 +197,8 @@ int copy_file(const char *src, const char *dst)
cleanup:
git_buf_free(&source_buf);
p_close(dst_fd);
if (dst_fd >= 0)
p_close(dst_fd);
return error;
}
......
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