From 98e5846bede4b322f7020f0410e39f59325ffcd5 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 28 Nov 2011 19:23:43 +0000 Subject: [PATCH] Tiny patch from Martin Packman to fix a Windows handle leak in Pageant's IPC mechanism. It's incomplete (he sent a much more comprehensive set of fixes that I haven't reviewed), but should be adequate to mitigate a particular issue for Bazaar users. git-svn-id: svn://svn.tartarus.org/sgt/putty@9355 cda61777-01e9-0310-a592-d414129be87e --- windows/winpgnt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/windows/winpgnt.c b/windows/winpgnt.c index e26621c7..291593e4 100644 --- a/windows/winpgnt.c +++ b/windows/winpgnt.c @@ -1938,8 +1938,10 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, } #endif if (!EqualSid(mapowner, ourself) && - !EqualSid(mapowner, ourself2)) + !EqualSid(mapowner, ourself2)) { + CloseHandle(filemap); return 0; /* security ID mismatch! */ + } #ifdef DEBUG_IPC debug(("security stuff matched\n")); #endif -- 2.11.0