From 59c0bb3f8a4542078eeca5f59c0fa4582e1663d1 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 28 Nov 2011 19:24:15 +0000 Subject: [PATCH] Merge r9355 (Pageant handle leak fix). [originally from svn r9356] [r9355 == 1682b42b87f441cf1e80ec72e82eecf1726eb99b] --- windows/winpgnt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/windows/winpgnt.c b/windows/winpgnt.c index eee99f50..c91695cf 100644 --- a/windows/winpgnt.c +++ b/windows/winpgnt.c @@ -1928,8 +1928,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