From: Jacob Nevins Date: Wed, 23 Oct 2002 14:24:40 +0000 (+0000) Subject: Minor compiler nits: X-Git-Tag: r8855-g4f798d~2085 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=ffd6d66a6d981483d6490bd35a136f459a1c6064;p=PuTTY_svn.git Minor compiler nits: - use smalloc/sfree, not malloc/free - include - include (although this doesn't shut the compiler up about non-ANSI stricmp/strnicmp) git-svn-id: http://svn.tartarus.org/sgt/putty@2121 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/proxy.c b/proxy.c index 9e3684ce..1bcb2b27 100644 --- a/proxy.c +++ b/proxy.c @@ -8,6 +8,8 @@ #include #include +#include +#include #define DEFINE_PLUG_METHOD_MACROS #include "putty.h" @@ -646,7 +648,7 @@ int proxy_socks4_negotiate (Proxy_Socket p, int change) } length = strlen(cfg.proxy_username) + 9; - command = (char*) malloc(length); + command = (char*) smalloc(length); strcpy(command + 8, cfg.proxy_username); command[0] = 4; /* version 4 */ @@ -660,7 +662,7 @@ int proxy_socks4_negotiate (Proxy_Socket p, int change) sk_addrcopy(p->remote_addr, command + 4); sk_write(p->sub_socket, command, length); - free(command); + sfree(command); p->state = 1; return 0;