mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-14 08:48:27 +00:00
Initialize sockaddr_un to fix valgrind uninitialised byte message. (#1547)
This commit is contained in:
parent
e5804d4a50
commit
ff34749572
1 changed files with 1 additions and 1 deletions
|
@ -2668,7 +2668,7 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
|
|||
|
||||
auto sock = socket(hints.ai_family, hints.ai_socktype, hints.ai_protocol);
|
||||
if (sock != INVALID_SOCKET) {
|
||||
sockaddr_un addr;
|
||||
sockaddr_un addr {};
|
||||
addr.sun_family = AF_UNIX;
|
||||
std::copy(host.begin(), host.end(), addr.sun_path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue