mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-25 05:29:50 +00:00
campaignd: fixed file descriptor leak on sendfile() codepath
This commit is contained in:
parent
ad02e381f2
commit
ec789c5051
@ -369,6 +369,7 @@ void server_base::coro_send_file(socket_ptr socket, const std::string& filename,
|
||||
{
|
||||
std::size_t filesize { std::size_t(filesystem::file_size(filename)) };
|
||||
int in_file { open(filename.c_str(), O_RDONLY) };
|
||||
ON_SCOPE_EXIT(in_file) { close(in_file); };
|
||||
off_t offset { 0 };
|
||||
//std::size_t total_bytes_transferred { 0 };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user