X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinshare.c;h=56276045b7ed29a6cbec4a075ba3d7332ab90ec2;hb=1de7240eb88fa24a8532ded116b4ec72dd213008;hp=a63325cb8abd24bd200797bfcc04061dac55e6d4;hpb=e11f8ee794c73bec1b640fc83b32252dd00b5044;p=PuTTY.git diff --git a/windows/winshare.c b/windows/winshare.c index a63325cb..56276045 100644 --- a/windows/winshare.c +++ b/windows/winshare.c @@ -14,12 +14,13 @@ #include "proxy.h" #include "ssh.h" +#include "wincapi.h" #include "winsecur.h" #ifdef COVERITY /* * The hack I use to build for Coverity scanning, using winegcc and - * Makefile.cyg, didn't provide some defines in wincrypt.h last time I + * Makefile.mgw, didn't provide some defines in wincrypt.h last time I * looked. Therefore, define them myself here, but enclosed in #ifdef * COVERITY to ensure I don't make up random nonsense values for any * real build. @@ -157,6 +158,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 +173,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;