1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Two more memory leak fixes, on error paths I didn't spot in r9919.

[originally from svn r9948]
[r9919 == ea301bdd9b]
This commit is contained in:
Simon Tatham 2013-07-21 07:40:26 +00:00
parent 1073d229ae
commit 08d46fca51
2 changed files with 2 additions and 0 deletions

View File

@ -370,6 +370,7 @@ const char *pfd_newconnect(Socket *s, char *hostname, int port,
addr = name_lookup(hostname, port, &dummy_realhost, conf, addressfamily);
if ((err = sk_addr_error(addr)) != NULL) {
sk_addr_free(addr);
sfree(dummy_realhost);
return err;
}

View File

@ -288,6 +288,7 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
if (pipe(to_cmd_pipe) < 0 ||
pipe(from_cmd_pipe) < 0) {
ret->error = dupprintf("pipe: %s", strerror(errno));
sfree(cmd);
return (Socket)ret;
}
cloexec(to_cmd_pipe[1]);