test_helpers: fix unepextected closing of file on error

This commit is contained in:
nulltoken 2012-03-21 08:10:40 +01:00
parent 0d0fa7c368
commit e285bdc93b

View File

@ -197,6 +197,7 @@ int copy_file(const char *src, const char *dst)
cleanup: cleanup:
git_buf_free(&source_buf); git_buf_free(&source_buf);
if (dst_fd >= 0)
p_close(dst_fd); p_close(dst_fd);
return error; return error;