mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 08:38:49 -05:00
connect: zero variable on stack to silence valgrind complaint
Valgrind will complain that ssrem buffer usage if not explicit
initialized, hence initialize it to zero.
This completes the change intially started in commit 2c0d721215
('ftp:
retry getpeername for FTP with TCP_FASTOPEN') where the ssloc buffer has
a similar memset to zero.
Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
Closes #6289
This commit is contained in:
parent
98dc917869
commit
8a10abaf85
@ -680,6 +680,7 @@ void Curl_conninfo_remote(struct connectdata *conn, curl_socket_t sockfd)
|
||||
struct Curl_sockaddr_storage ssrem;
|
||||
curl_socklen_t plen;
|
||||
plen = sizeof(struct Curl_sockaddr_storage);
|
||||
memset(&ssrem, 0, sizeof(ssrem));
|
||||
if(getpeername(sockfd, (struct sockaddr*) &ssrem, &plen)) {
|
||||
int error = SOCKERRNO;
|
||||
failf(conn->data, "getpeername() failed with errno %d: %s",
|
||||
|
Loading…
Reference in New Issue
Block a user