1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-04 21:12:47 -05:00

Another big batch of memory leak fixes, again mostly on error paths.

The most interesting one is printer_add_enum, which I've modified to
take a char ** rather than a char * so that it can both realloc its
input buffer _and_ return NULL to indicate error.

[originally from svn r9959]
This commit is contained in:
Simon Tatham
2013-07-22 07:11:54 +00:00
parent 4c61cb20a1
commit b99bec3b02
9 changed files with 107 additions and 42 deletions

View File

@ -180,6 +180,7 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
sa.bInheritHandle = TRUE;
if (!CreatePipe(&us_from_cmd, &cmd_to_us, &sa, 0)) {
ret->error = dupprintf("Unable to create pipes for proxy command");
sfree(cmd);
return (Socket)ret;
}
@ -187,6 +188,7 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
CloseHandle(us_from_cmd);
CloseHandle(cmd_to_us);
ret->error = dupprintf("Unable to create pipes for proxy command");
sfree(cmd);
return (Socket)ret;
}