mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 15:33:51 +00:00
Merge pull request #607 from nulltoken/fix/file-close-on-error
test helpers: Fix file close on error
This commit is contained in:
commit
ae4cae4e08
@ -197,7 +197,8 @@ int copy_file(const char *src, const char *dst)
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
git_buf_free(&source_buf);
|
git_buf_free(&source_buf);
|
||||||
p_close(dst_fd);
|
if (dst_fd >= 0)
|
||||||
|
p_close(dst_fd);
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user