summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-04-19 19:23:23 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-04-19 19:26:35 +0200
commit8c938ef383dba26c3663ad0b3ce59d1260307930 (patch)
treee87b97d89ca1d40bbc6209ef65a9ad8441e2c42a /src/socket.c
parent2e37e3c4a22e88024cca71269d25163e012ac146 (diff)
downloadgnutls-8c938ef383dba26c3663ad0b3ce59d1260307930.tar.gz
tools: explicitly initialize socket struct to zero
That resolves issue where verbose was enabled by default.
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c
index be6f1ad91a..892e7f12a3 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -328,6 +328,8 @@ socket_open(socket_st * hd, const char *hostname, const char *service,
char portname[16] = { 0 };
char *a_hostname = (char*)hostname;
+ memset(hd, 0, sizeof(*hd));
+
#ifdef HAVE_LIBIDN
err = idna_to_ascii_8z(hostname, &a_hostname, IDNA_ALLOW_UNASSIGNED);
if (err != IDNA_SUCCESS) {