mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48: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);
|
addr = name_lookup(hostname, port, &dummy_realhost, conf, addressfamily);
|
||||||
if ((err = sk_addr_error(addr)) != NULL) {
|
if ((err = sk_addr_error(addr)) != NULL) {
|
||||||
sk_addr_free(addr);
|
sk_addr_free(addr);
|
||||||
|
sfree(dummy_realhost);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,6 +288,7 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
|
|||||||
if (pipe(to_cmd_pipe) < 0 ||
|
if (pipe(to_cmd_pipe) < 0 ||
|
||||||
pipe(from_cmd_pipe) < 0) {
|
pipe(from_cmd_pipe) < 0) {
|
||||||
ret->error = dupprintf("pipe: %s", strerror(errno));
|
ret->error = dupprintf("pipe: %s", strerror(errno));
|
||||||
|
sfree(cmd);
|
||||||
return (Socket)ret;
|
return (Socket)ret;
|
||||||
}
|
}
|
||||||
cloexec(to_cmd_pipe[1]);
|
cloexec(to_cmd_pipe[1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user