mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Fix a few more memory and resource leaks.
[originally from svn r9968]
This commit is contained in:
parent
e5d3a353cc
commit
eb19a35a3d
1
proxy.c
1
proxy.c
@ -474,6 +474,7 @@ Socket new_connection(SockAddr addr, char *hostname,
|
|||||||
if (sk_addr_error(proxy_addr) != NULL) {
|
if (sk_addr_error(proxy_addr) != NULL) {
|
||||||
ret->error = "Proxy error: Unable to resolve proxy host name";
|
ret->error = "Proxy error: Unable to resolve proxy host name";
|
||||||
sfree(pplug);
|
sfree(pplug);
|
||||||
|
sk_addr_free(proxy_addr);
|
||||||
return (Socket)ret;
|
return (Socket)ret;
|
||||||
}
|
}
|
||||||
sfree(proxy_canonical_name);
|
sfree(proxy_canonical_name);
|
||||||
|
3
psftp.c
3
psftp.c
@ -1258,7 +1258,9 @@ int sftp_general_get(struct sftp_command *cmd, int restart, int multiple)
|
|||||||
fname = canonify(origwfname);
|
fname = canonify(origwfname);
|
||||||
|
|
||||||
if (!fname) {
|
if (!fname) {
|
||||||
|
sftp_finish_wildcard_matching(swcm);
|
||||||
printf("%s: canonify: %s\n", origwfname, fxp_error());
|
printf("%s: canonify: %s\n", origwfname, fxp_error());
|
||||||
|
sfree(origwfname);
|
||||||
sfree(unwcfname);
|
sfree(unwcfname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2720,6 +2722,7 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
|
|||||||
/* Use `host' as a bare hostname. */
|
/* Use `host' as a bare hostname. */
|
||||||
conf_set_str(conf, CONF_host, host);
|
conf_set_str(conf, CONF_host, host);
|
||||||
}
|
}
|
||||||
|
conf_free(conf2);
|
||||||
} else {
|
} else {
|
||||||
/* Patch in hostname `host' to session details. */
|
/* Patch in hostname `host' to session details. */
|
||||||
conf_set_str(conf, CONF_host, host);
|
conf_set_str(conf, CONF_host, host);
|
||||||
|
@ -954,8 +954,11 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
|
|||||||
/*
|
/*
|
||||||
* Load a key file if one was provided on the command line.
|
* Load a key file if one was provided on the command line.
|
||||||
*/
|
*/
|
||||||
if (cmdline_keyfile)
|
if (cmdline_keyfile) {
|
||||||
load_key_file(hwnd, state, filename_from_str(cmdline_keyfile), 0);
|
Filename *fn = filename_from_str(cmdline_keyfile);
|
||||||
|
load_key_file(hwnd, state, fn, 0);
|
||||||
|
filename_free(fn);
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user