mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
Add an assortment of missing frees and closes.
Coverity's resource-leak checker is on the ball as usual.
This commit is contained in:
@ -58,6 +58,7 @@ void init_help(void)
|
||||
HINSTANCE dllHH = load_system32_dll("hhctrl.ocx");
|
||||
GET_WINDOWS_FUNCTION(dllHH, HtmlHelpA);
|
||||
if (!p_HtmlHelpA) {
|
||||
sfree(chm_path);
|
||||
chm_path = NULL;
|
||||
if (dllHH)
|
||||
FreeLibrary(dllHH);
|
||||
|
@ -77,6 +77,10 @@ Socket platform_new_connection(SockAddr addr, const char *hostname,
|
||||
Socket ret = new_error_socket
|
||||
("Unable to create pipes for proxy command", plug);
|
||||
sfree(cmd);
|
||||
CloseHandle(us_from_cmd);
|
||||
CloseHandle(cmd_to_us);
|
||||
CloseHandle(us_to_cmd);
|
||||
CloseHandle(cmd_from_us);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -220,6 +220,7 @@ static const char *serial_init(void *frontend_handle, void **backend_handle,
|
||||
{
|
||||
char *msg = dupprintf("Opening serial device %s", serline);
|
||||
logevent(serial->frontend, msg);
|
||||
sfree(msg);
|
||||
}
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user