mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Fix assorted memory leaks.
All spotted by Coverity.
This commit is contained in:
@ -157,6 +157,7 @@ int platform_ssh_share(const char *pi_name, Conf *conf,
|
||||
if (!make_private_security_descriptor(MUTEX_ALL_ACCESS,
|
||||
&psd, &acl, logtext)) {
|
||||
sfree(mutexname);
|
||||
sfree(name);
|
||||
return SHARE_NONE;
|
||||
}
|
||||
|
||||
@ -171,6 +172,7 @@ int platform_ssh_share(const char *pi_name, Conf *conf,
|
||||
*logtext = dupprintf("CreateMutex(\"%s\") failed: %s",
|
||||
mutexname, win_strerror(GetLastError()));
|
||||
sfree(mutexname);
|
||||
sfree(name);
|
||||
LocalFree(psd);
|
||||
LocalFree(acl);
|
||||
return SHARE_NONE;
|
||||
|
Reference in New Issue
Block a user