From: jacob Date: Fri, 11 Oct 2002 12:29:27 +0000 (+0000) Subject: Initialise some members of the Proxy_Socket structure that were left X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/65c78e88edd541366726a65911825cf88083a4d9?hp=83616aab6bc220846b1f70b4b5b13b3c395a2ef9 Initialise some members of the Proxy_Socket structure that were left uninitialised. This problem only showed up with mingw builds of PuTTY (maybe MSVCRT is more forgiving with malloc initialisation than CRTDLL?). The 'error' field was causing me most trouble, and I think the other two were necessary too before things started working. Note however that I don't fully understand the code, and that there are more uninitialised fields in the structure. git-svn-id: svn://svn.tartarus.org/sgt/putty@2029 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/proxy.c b/proxy.c index 2d32d880..b9ed5489 100644 --- a/proxy.c +++ b/proxy.c @@ -314,6 +314,12 @@ Socket new_connection(SockAddr addr, char *hostname, ret->remote_addr = addr; ret->remote_port = port; + /* XXX review these initialisations, and initialise other fields + * in Proxy_Socket structure */ + ret->error = NULL; + ret->pending_flush = 0; + ret->freeze = 0; + bufchain_init(&ret->pending_input_data); bufchain_init(&ret->pending_output_data); bufchain_init(&ret->pending_oob_output_data);