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:
parent
1073d229ae
commit
08d46fca51
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user